Dataset Extract - Quoting Issue
I have notice an issue with text data being modified when being downloaded using the Python API.
I have a column in Domo defined as Text from the web ui and as STRING in the json response. In some of the rows the value is just a hyphen -, but when I extract the data to CSV it is written as '- (a single quote and the hyphen).
Here is how I am downloading the file:
domo.datasets.data_export_to_file(dataset_id='my-id', file_path='local_path', include_csv_header=True)
If I use postman to call the api directly the response looks correct. https://api.domo.com/v1/datasets/query/execute/<< dataset id >>
Body:
{"sql": "SELECT * FROM table limit 1"}
pip list
Package Version
----------------- ---------
pydomo 0.3.0.2
Can you try using "domo.ds_get('my-id') to see if that fixes the issue? If you want to query the data set, try "domo.ds_query('my-id','my query'). I didn't write the data_export_to_file function and would rather fix in either ds_get or ds_query if the issue persists there.
Hi @jeremydmorris the domo.ds_query() method works as expected.
domo.ds_get('my-id') is really resource heavy when working with fairly large datasets (2GB / 10M rows). I haven't had much success testing here. The Python process is consuming about 14GB of RAM.
I think the actual issue is upstream in the REST API implementation. If I retrieve the data using curl the data still comes back with the single quote.
curl --location --request GET 'https://api.domo.com/v1/datasets/<< dataset id >>/data?includeHeader=true&fileName=<< file_name.csv >>' \
--header 'Accept: text/csv' \
--header 'Authorization: Bearer << TOKEN >>'
Are you able to open an issue with the folks who maintain the REST API?