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!
0
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
Categories
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 472 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 202 Visualize
- 255 Beast Mode
- 2.1K Charting
- 12 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 179 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive