The files in these examples are read only. To execute the files you will need to copy + paste the code, or download the files and upload them into your workspace.
Example of how to read data from a Domo DataSet and use it in a Jupyter Notebook
- ExampleReadData.ipynb - A Jupyter notebook with a simple example of adding a Domo DataSet to a notebook
In order to use a DataSet in a notebook do the following:
- When creating or updating a workspace choose the optional step "Input DataSets"
- Select the button "Add Input DataSet"
- Choose a DataSet
Optionally, give the dataset a different alias
- Click "Save Workspace" to apply your dataset
- Start your workspace
- Create a new notebook (or update an existing notebook)
- On the left navigation there is a DataSet icon
- Use this to view the input DataSets you have configured for the workspace
- Optionally double-click on the dataset name to pre-populate starting code to use the DataSet. Skip steps 4 - 5
In Jupyter we use pandas.DataFrame to work with data. We will be using Pandas for our example.
- See more documentation on Pandas: documentation
- Import the domojupyter asset
import domojupyter as domo
- Create a variable and assign it to the value of
input = domo.read_dataframe('dataset_name', query='SELECT * FROM table')
- You can update the query parameter to change what data is pulled from the DataSet
- You can output data into a Domo DataSet (see other example)