Change Update Method Using Pydomo
Created a dataset using Pydomo.
ds_update method does only a REPLACE.
Not sure how to change it to append.
Any help is appreciated. Thanks!
Best Answers
-
.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@ElliotGitter @GrantSmith answered it correctly.
After you authenticate
domo = Domo(client_id, secret, api_host = api_host)
datasets = domo.datasets
csv_file_path = './yourfileaname.csv'
datasets.data_import_from_file(dataset['yourdatasetid'], csv_file_path)
The following link should help :https://github.com/domoinc/domo-python-sdk/blob/master/examples/dataset.py
0
Answers
-
Hi @user059353, you could use ds_import:
ds_import(ds_id, df_up, update_method = "REPLACE")
where
ds_id
: Data set id (from url in Domo).df_up
: Dataframe to upload.update_method
:Optional choose the appropriate updateMethod when importing data via the API. Available choices are either to APPEND or REPLACE.11 -
Hi @amehdad.
The ds_import function is not available in the PyDomo module.
I get an error when I try to inspect the arguements.
>>> inspect.getfullargspec(Domo.ds_query)
FullArgSpec(args=['self', 'dataset_id', 'query', 'return_data'], varargs=None, varkw=None, defaults=(True,), kwonlyargs=[], kwonlydefaults=None, annotations={})
>>> inspect.getfullargspec(Domo.ds_import)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'Domo' has no attribute 'ds_import'
0 -
Definitely reach out to Support [support.domo.com] then to have them look at it as well (and escalate to Dev if need be).
12 -
This didn't work for me either (using python), did you ever figure this out? The only problem is, my ds_update is only appending now. Wish there was a clear function like the import noted above that worked.
0 -
.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@ElliotGitter @GrantSmith answered it correctly.
After you authenticate
domo = Domo(client_id, secret, api_host = api_host)
datasets = domo.datasets
csv_file_path = './yourfileaname.csv'
datasets.data_import_from_file(dataset['yourdatasetid'], csv_file_path)
The following link should help :https://github.com/domoinc/domo-python-sdk/blob/master/examples/dataset.py
0 -
Unfortunately, ds_import and ds_rename functions are not available now.
0
Categories
- All Categories
- 1.5K Product Ideas
- 1.5K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 283 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.7K Transform
- 90 SQL DataFlows
- 564 Datasets
- 2K Magic ETL
- 3.4K Visualize
- 2.3K Charting
- 592 Beast Mode
- 13 App Studio
- 28 Variables
- 588 Automate
- 143 Apps
- 417 APIs & Domo Developer
- 27 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 361 Distribute
- 99 Domo Everywhere
- 260 Scheduled Reports
- 2 Software Integrations
- 94 Manage
- 91 Governance & Security
- 10 Product Releases
- Community Forums
- 37 Getting Started
- 28 Community Member Introductions
- 90 Community Announcements
- 4.8K Archive