PyDomo - DS_Update to Append Data?
Hello all,
I've written a script that ideally will create a datastream into Domo. At the moment though, I'm struggling to find a way to replace the update method of ds_update() from PyDomo. The default appears to be replacing the data, but I need to append the dataset.
Does anyone have any experience with this? Any help would be greatly appreciated? Thanks!
Comments
-
pydomo/ds_update doesn't support append at this time. You could configure a recursive dataflow to append your data.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
@andrew10196 I'm not 100% sure if this solves your problem but here is an example function that seems to work for me via domo.streams
def append_domo_dataset(domo, stream_id, part, csv): streams = domo.streams # update method needs to be either 'REPLACE' or 'APPEND' execution = streams.create_execution(stream_id, update_method='APPEND') execution_id = execution['id'] print('Created execution id number', execution_id, 'with update method', execution['updateMethod']) print('getting execution') retrieved_execution = streams.get_execution(stream_id, execution_id) print('Retrieved execution with id', retrieved_execution['id']) execution = streams.upload_part(stream_id, execution_id, part, csv) print('Uploaded part') committed_execution = streams.commit_execution(stream_id, execution_id) print('committed execution', committed_execution['id']) return stream_id, execution['id'], retrieved_execution['id'], committed_execution['id']
0 -
I need to do the same, the problem with "streams" is the data fortma must be CVS format, I would like to send a dataframe.
this method works but it can obly replace, dont allow the parrameter "update_method"
domo.ds_update(dataset_id,dataframe)
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