duneanalytics / dune-client

A framework for interacting with Dune Analytics' officially supported API service
Apache License 2.0
85 stars 22 forks source link

[Feature] Introducing CRUD Operations #59

Closed bh2smith closed 1 year ago

bh2smith commented 1 year ago

Dune recently added endpoints and documentation for their Queries Editing Support via the API. This PR introduces new functionality

as well as make_private

Unfortunately these operations require Premium membership, so I can not add tests yet.

*the the model DuneQuery should really make use of a real json serialization library (as well as any model implementing to/from dict), but this is a separate refactoring task.

Note that the tests failing here are related to a previous PR. #58

cc @grkhr - I may have to revert those changes until this feature is working as expected. I tried with CURL and it was fine

curl -X POST "https://api.dune.com/api/v1/query/2704703/execute" -H x-dune-api-key:${DUNE_API_KEY}  -d '{"performance": "large"}'

cc @grkhr

grkhr commented 1 year ago

Hey @bh2smith answering here as conversation "has been locked and limited to collaborators"

That's happening because it's trying to run this query which is deprecated for running on large cluster. Replace the sample query to any written on Trino and it'll be fine.

bh2smith commented 1 year ago

Replace the sample query to any written on Trino and it'll be fine.

Awesome thanks!