Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset Extract - Quoting Issue #58

Open
bradleyhurley opened this issue Feb 6, 2021 · 2 comments
Open

Dataset Extract - Quoting Issue #58

bradleyhurley opened this issue Feb 6, 2021 · 2 comments
Assignees

Comments

@bradleyhurley
Copy link
Contributor

bradleyhurley commented Feb 6, 2021

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
@jeremydmorris
Copy link
Contributor

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.

@jeremydmorris jeremydmorris self-assigned this Feb 8, 2021
@bradleyhurley
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants