You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-reference/queries/endpoint/query-object.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'Overview'
3
3
icon: "star"
4
4
---
5
5
6
-
These query management endspoints help you programmatically create and manage Dune SQL queries via the API, ideal for integration with GitHub or other CI/CD pipelines.
6
+
These query management endpoints help you programmatically create and manage Dune SQL queries via the API, ideal for integration with GitHub or other CI/CD pipelines.
7
7
8
8
### Queries
9
9
@@ -15,7 +15,7 @@ Each query comes with fields you can edit such as:
15
15
-`query_sql`: the raw sql text
16
16
-`params`: parameters within the query, using the `{{ foo }}` syntax. See the section below for more details.
17
17
-`is_private`: boolean for if query is private or not. Private queries cannot be found or queried by others.
18
-
-`archived`: boolean for if query is archived or not. Archived queries cannot run or edited by anyone.
18
+
-`archived`: boolean for if query is archived or not. Archived queries cannot be run or edited by anyone.
19
19
20
20
### Query Parameters
21
21
@@ -35,7 +35,7 @@ For passing these parameters through the API request body, you can use the follo
35
35
"baz": "2020-12-01T01:20:30Z"
36
36
}
37
37
```
38
-
Where "foo", "bar", and "baz" are three params in a query. If you leave one out, it goes with the default param valiue.
38
+
Where "foo", "bar", and "baz" are three params in a query. If you leave one out, it goes with the default param value.
39
39
40
40
For Queries endpoints, you'll need to define the type and more:
payload:= strings.NewReader("{\n\"query_id\": 1252207,\n,\n\"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
76
+
payload:= strings.NewReader("{\n\"query_id\": 1252207,\n\"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
77
77
78
78
req, _:= http.NewRequest("PATCH", url, payload)
79
79
@@ -104,7 +104,7 @@ curl_setopt_array($curl, [
104
104
CURLOPT_TIMEOUT => 30,
105
105
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
106
106
CURLOPT_CUSTOMREQUEST => "PATCH",
107
-
CURLOPT_POSTFIELDS => "{\n \"query_id\": 1252207,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}",
107
+
CURLOPT_POSTFIELDS => "{\n \"query_id\": 1252207,\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}",
.body("{\n\"query_id\": 1252207,\n\"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
130
+
.body("{\n\"query_id\": 1252207,\n\"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}")
Copy file name to clipboardExpand all lines: api-reference/quickstart/queries-eg.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ In this quickstart, we will walk through how to turn any dashboard (or set of qu
6
6
7
7
### Prerequisites
8
8
- Python environment set up (check out [Anaconda Navigator](https://docs.continuum.io/free/navigator/) if you want somewhere to start.)
9
-
- Have a Dune API key from the team/user who's queries you want to manage (to obtain one [follow the steps here](../overview/authentication#generate-an-api-key))
9
+
- Have a Dune API key from the team/user whose queries you want to manage (to obtain one [follow the steps here](../overview/authentication#generate-an-api-key))
Copy file name to clipboardExpand all lines: api-reference/quickstart/tables-eg.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ DUNE_API_KEY=<paste your API key here>
16
16
</Tip>
17
17
18
18
### Upload the CSV
19
-
Follow below steps to upload your CSV. Please make sure to modify paths to your .env file and to your CSV file.
19
+
Follow the below steps to upload your CSV. Please make sure to modify paths to your .env file and to your CSV file.
20
20
21
21
```python
22
22
import dotenv, os
@@ -45,7 +45,7 @@ with open(csv_file_path) as open_file:
45
45
46
46
Once the upload is successful, you will see the data show up under [Your Data](https://dune.com/queries?category=uploaded_data) in the Data Explorer.
47
47
48
-
You can query your uploaded table under the name `dune.<team or user handle>.dataset_<table name defined>`. For example, here I defined the table name to be "cereal_table" and my team name is "dune", so to access the uploaded table we will do `select * from dune.dune.dataset_cereal_table`
48
+
You can query your uploaded table under the name `dune.<team or user handle>.dataset_<table name defined>`. For example, here I defined the table name to be "cereal_table" and my team name is "dune", so to access the uploaded table we will do `select * from dune.dune.dataset_cereal_table`.
0 commit comments