-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature: Download CSV #73
Conversation
b84dd2c
to
f3e948a
Compare
94d0546
to
b2204fa
Compare
46959b7
to
1eed668
Compare
32d253d
to
7edc25a
Compare
1eed668
to
abdc08b
Compare
fde63d9
to
f1fec83
Compare
url = self._route_url(f"/execution/{job_id}/results/csv") | ||
self.logger.debug(f"GET CSV received input url={url}") | ||
response = self._get(route=route, raw=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was unnecessary because the _get method does this same debug logging.
https://dune.com/docs/api/api-reference/latest_results/ | ||
https://dune.com/docs/api/api-reference/get-results/latest-results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL has changed since last time.
pandas.from_csv(data) | ||
pandas.read_csv(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a typo.
4567baa
to
2aa3ad0
Compare
9f41015
to
37ff8ed
Compare
421211e
to
90187a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ship it
* only run e2e on one python version (fewer requests) * add download_csv functionality (#73)
This method is similar to that of
get_latest_results
except that it returns in CSV format as outlined here: https://dune.com/docs/api/api-reference/get-results/latest-results/I noticed that the docs don't give example responses of the csv route.
A few things were updated here (url to api docs on
get_latest_results
).We created a utility function to avoid tripling the same code block that handles query objects or types. Functionality is now unit tested.
Closes #66
cc @TheEdgeOfRage & @diegoximenes for additional review.