Automatically export Dataset from Domo
Comments
-
I would recommend using the API to do this, it will require the following.
1: Script that pulls down the data of a specific dataset into a CSV (all doable with the API/SDK. I've done this in Python).
2: Once the file is downloaded the script would send it via email
3: A way to run the script on a schedule so that you can have it run daily.
This seems to me to be the most basic way you can do this. You would be able to re-use almost all the code for any dataset you want to do this for, you would just swap out the dataset ID to get different datasets.
Here is some example Python code from a script I made to do this, it'll get you started (if you do it in Python)
import json
import requests
import datetime
# Base64 version of combined id+secret
base64auth = {InsertYourBase64Auth}
api_host = 'api.domo.com'
# Get token from Domo
token = requests.get('https://api.domo.com/oauth/token?grant_type=client_credentials&scope=audit data', headers={'Authorization': 'Basic ' + base64auth})
token = json.loads(token.text)
token = token['access_token']
dataset_id ={EnterYourDatasetId}
csv_file_path = 'C:\\Users\\{UserAccount}\\PycharmProjects\\DomoScripts\\files\\jira-data.csv'
# GET request for the dataset list data
dataset_endpoint = "https://api.domo.com/v1/datasets/"+ dataset_id + "/data?includeHeader=true&fileName=jira-data.csv"
dataset_response = requests.get(dataset_endpoint, headers={'Accept': 'text/csv','Authorization': 'bearer ' + token})
with open(csv_file_path,'wb') as csv_file:
for chunk in dataset_response.iter_content(chunk_size=1024):
if chunk:
csv_file.write(chunk)
csv_file.close()
**Make sure to like any users posts that helped you and accept the ones who solved your issue.**1 -
This is not helpful because the card is a pivot table, and I don't think a CSV would keep the pivot, and certainly would not keep the conditional formatting.
It is maddening that the reports and publish only do a jpg of what fits on one page, while the export to xls is exactly the format I would like to send out as an automated report.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive