Skip to content

Commit d4f116c

Browse files
skuldshaovtlim
andauthored
[Docs] Update and add SQL examples to use SET (apache#18027)
Co-authored-by: Victoria Lim <[email protected]>
1 parent 5cfd114 commit d4f116c

File tree

7 files changed

+84
-65
lines changed

7 files changed

+84
-65
lines changed

docs/api-reference/sql-api.md

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ If you detect a truncated response, treat it as an error.
188188

189189
#### Sample request
190190

191-
The following example retrieves all rows in the `wikipedia` datasource where the `user` is `BlueMoon2662`. The query is assigned the ID `request01` using the `sqlQueryId` context parameter. The optional properties `header`, `typesHeader`, and `sqlTypesHeader` are set to `true` to include type information to the response.
191+
In the following example, this query demonstrates the following actions:
192+
- Retrieves all rows from the `wikipedia` datasource.
193+
- Filters the results where the `user` value is `BlueMoon2662`.
194+
- Applies the `sqlTimeZone` context parameter to set the time zone of results to `America/Los_Angeles`.
195+
- Returns descriptors for `header`, `typesHeader`, and `sqlTypesHeader`.
196+
192197

193198
<Tabs>
194199

@@ -200,7 +205,7 @@ curl "http://ROUTER_IP:ROUTER_PORT/druid/v2/sql" \
200205
--header 'Content-Type: application/json' \
201206
--data '{
202207
"query": "SELECT * FROM wikipedia WHERE user='\''BlueMoon2662'\''",
203-
"context" : {"sqlQueryId" : "request01"},
208+
"context" : {"sqlTimeZone" : "America/Los_Angeles"},
204209
"header" : true,
205210
"typesHeader" : true,
206211
"sqlTypesHeader" : true
@@ -215,11 +220,11 @@ curl "http://ROUTER_IP:ROUTER_PORT/druid/v2/sql" \
215220
POST /druid/v2/sql HTTP/1.1
216221
Host: http://ROUTER_IP:ROUTER_PORT
217222
Content-Type: application/json
218-
Content-Length: 192
223+
Content-Length: 201
219224
220225
{
221226
"query": "SELECT * FROM wikipedia WHERE user='BlueMoon2662'",
222-
"context" : {"sqlQueryId" : "request01"},
227+
"context" : {"sqlTimeZone" : "America/Los_Angeles"},
223228
"header" : true,
224229
"typesHeader" : true,
225230
"sqlTypesHeader" : true
@@ -229,6 +234,20 @@ Content-Length: 192
229234
</TabItem>
230235
</Tabs>
231236

237+
You can also specify query-level context parameters directly within the SQL query string using the `SET` command. For more details, see [SET statements](../querying/sql.md#set-statements).
238+
239+
The following request body is functionally equivalent to the previous example and uses SET instead of the `context` parameter:
240+
241+
```JSON
242+
{
243+
"query": "SET sqlTimeZone='America/Los_Angeles'; SELECT * FROM wikipedia WHERE user='BlueMoon2662'",
244+
"header": true,
245+
"typesHeader": true,
246+
"sqlTypesHeader": true
247+
}
248+
```
249+
250+
232251
#### Sample response
233252

234253
<details>
@@ -262,24 +281,24 @@ Content-Length: 192
262281
"sqlType": "VARCHAR"
263282
},
264283
"isAnonymous": {
265-
"type": "LONG",
266-
"sqlType": "BIGINT"
284+
"type": "STRING",
285+
"sqlType": "VARCHAR"
267286
},
268287
"isMinor": {
269-
"type": "LONG",
270-
"sqlType": "BIGINT"
288+
"type": "STRING",
289+
"sqlType": "VARCHAR"
271290
},
272291
"isNew": {
273-
"type": "LONG",
274-
"sqlType": "BIGINT"
292+
"type": "STRING",
293+
"sqlType": "VARCHAR"
275294
},
276295
"isRobot": {
277-
"type": "LONG",
278-
"sqlType": "BIGINT"
296+
"type": "STRING",
297+
"sqlType": "VARCHAR"
279298
},
280299
"isUnpatrolled": {
281-
"type": "LONG",
282-
"sqlType": "BIGINT"
300+
"type": "STRING",
301+
"sqlType": "VARCHAR"
283302
},
284303
"metroCode": {
285304
"type": "LONG",
@@ -319,22 +338,22 @@ Content-Length: 192
319338
}
320339
},
321340
{
322-
"__time": "2015-09-12T00:47:53.259Z",
341+
"__time": "2015-09-11T17:47:53.259-07:00",
323342
"channel": "#ja.wikipedia",
324-
"cityName": "",
343+
"cityName": null,
325344
"comment": "/* 対戦通算成績と得失点 */",
326-
"countryIsoCode": "",
327-
"countryName": "",
328-
"isAnonymous": 0,
329-
"isMinor": 1,
330-
"isNew": 0,
331-
"isRobot": 0,
332-
"isUnpatrolled": 0,
333-
"metroCode": 0,
345+
"countryIsoCode": null,
346+
"countryName": null,
347+
"isAnonymous": "false",
348+
"isMinor": "true",
349+
"isNew": "false",
350+
"isRobot": "false",
351+
"isUnpatrolled": "false",
352+
"metroCode": null,
334353
"namespace": "Main",
335354
"page": "アルビレックス新潟の年度別成績一覧",
336-
"regionIsoCode": "",
337-
"regionName": "",
355+
"regionIsoCode": null,
356+
"regionName": null,
338357
"user": "BlueMoon2662",
339358
"delta": 14,
340359
"added": 14,

docs/api-reference/sql-ingestion-api.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,23 @@ The `/druid/v2/sql/task` endpoint accepts the following:
101101
### Sample request
102102

103103
The following example shows a query that fetches data from an external JSON source and inserts it into a table named `wikipedia`.
104+
The example specifies two query context parameters:
105+
106+
- `maxNumTasks=3`: Limits the maximum number of parallel tasks to 3.
107+
- `finalizeAggregations=false`: Ensures that Druid saves the aggregation's intermediate type during ingestion. For more information, see [Rollup](../multi-stage-query/concepts.md#rollup).
108+
104109

105110
<Tabs>
106111

107112
<TabItem value="4" label="HTTP">
108113

109-
110114
```HTTP
111115
POST /druid/v2/sql/task HTTP/1.1
112116
Host: http://ROUTER_IP:ROUTER_PORT
113117
Content-Type: application/json
114118
115119
{
116-
"query": "INSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}',\n '{\"type\": \"json\"}',\n '[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\n )\n)\nPARTITIONED BY DAY",
117-
"context": {
118-
"maxNumTasks": 3
119-
}
120+
"query": "SET maxNumTasks=3;\nSET finalizeAggregations=false;\nINSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}',\n '{\"type\": \"json\"}',\n '[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\n )\n)\nPARTITIONED BY DAY"
120121
}
121122
```
122123

@@ -128,12 +129,9 @@ Content-Type: application/json
128129
```shell
129130
curl --location --request POST 'http://ROUTER_IP:ROUTER_PORT/druid/v2/sql/task' \
130131
--header 'Content-Type: application/json' \
131-
--data-raw '{
132-
"query": "INSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '\''{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}'\'',\n '\''{\"type\": \"json\"}'\'',\n '\''[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\''\n )\n)\nPARTITIONED BY DAY",
133-
"context": {
134-
"maxNumTasks": 3
135-
}
136-
}'
132+
--data '{
133+
"query": "SET maxNumTasks=3;\nSET finalizeAggregations=false;\nINSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '\''{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}'\'',\n '\''{\"type\": \"json\"}'\'',\n '\''[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\''\n )\n)\nPARTITIONED BY DAY"
134+
}'
137135
```
138136

139137
</TabItem>
@@ -148,10 +146,7 @@ import requests
148146
url = "http://ROUTER_IP:ROUTER_PORT/druid/v2/sql/task"
149147

150148
payload = json.dumps({
151-
"query": "INSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}',\n '{\"type\": \"json\"}',\n '[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\n )\n)\nPARTITIONED BY DAY",
152-
"context": {
153-
"maxNumTasks": 3
154-
}
149+
"query": "SET maxNumTasks=3;\nSET finalizeAggregations=false;\nINSERT INTO wikipedia\nSELECT\n TIME_PARSE(\"timestamp\") AS __time,\n *\nFROM TABLE(\n EXTERN(\n '{\"type\": \"http\", \"uris\": [\"https://druid.apache.org/data/wikipedia.json.gz\"]}',\n '{\"type\": \"json\"}',\n '[{\"name\": \"added\", \"type\": \"long\"}, {\"name\": \"channel\", \"type\": \"string\"}, {\"name\": \"cityName\", \"type\": \"string\"}, {\"name\": \"comment\", \"type\": \"string\"}, {\"name\": \"commentLength\", \"type\": \"long\"}, {\"name\": \"countryIsoCode\", \"type\": \"string\"}, {\"name\": \"countryName\", \"type\": \"string\"}, {\"name\": \"deleted\", \"type\": \"long\"}, {\"name\": \"delta\", \"type\": \"long\"}, {\"name\": \"deltaBucket\", \"type\": \"string\"}, {\"name\": \"diffUrl\", \"type\": \"string\"}, {\"name\": \"flags\", \"type\": \"string\"}, {\"name\": \"isAnonymous\", \"type\": \"string\"}, {\"name\": \"isMinor\", \"type\": \"string\"}, {\"name\": \"isNew\", \"type\": \"string\"}, {\"name\": \"isRobot\", \"type\": \"string\"}, {\"name\": \"isUnpatrolled\", \"type\": \"string\"}, {\"name\": \"metroCode\", \"type\": \"string\"}, {\"name\": \"namespace\", \"type\": \"string\"}, {\"name\": \"page\", \"type\": \"string\"}, {\"name\": \"regionIsoCode\", \"type\": \"string\"}, {\"name\": \"regionName\", \"type\": \"string\"}, {\"name\": \"timestamp\", \"type\": \"string\"}, {\"name\": \"user\", \"type\": \"string\"}]'\n )\n)\nPARTITIONED BY DAY"
155150
})
156151
headers = {
157152
'Content-Type': 'application/json'
@@ -174,8 +169,8 @@ print(response.text)
174169

175170
```json
176171
{
177-
"taskId": "query-f795a235-4dc7-4fef-abac-3ae3f9686b79",
178-
"state": "RUNNING",
172+
"taskId": "query-431c4a18-9dde-4ec8-ab82-ec7fd17d5a4e",
173+
"state": "RUNNING"
179174
}
180175
```
181176
</details>

docs/multi-stage-query/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sidebar_label: Examples
3232
These example queries show you some of the things you can do when modifying queries for your use case. Copy the example queries into the **Query** view of the web console and run them to see what they do.
3333

3434
:::tip
35-
When you insert or replace data with SQL-based ingestion, set the context parameter `finalizeAggregations` to `false`. This context parameter is automatically set for you if you use the Druid console. If you use the API, you must explicitly set it. For more information, see [Rollup](./concepts.md#rollup).
35+
When you insert or replace data with SQL-based ingestion, set the context parameter `finalizeAggregations` to `false`. This context parameter is automatically set for you if you use the Druid console. If you use the API, you must explicitly set it. For an example, see [SQL-based ingestion API](../api-reference/sql-ingestion-api#sample-request). For details on aggregations, see [Rollup](./concepts.md#rollup).
3636
:::
3737

3838
## INSERT with no rollup

docs/multi-stage-query/reference.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ s3://export-bucket/export/query-6564a32f-2194-423a-912e-eead470a37c4-worker0-par
111111
Keep the following in mind when using EXTERN to export rows:
112112
- Only INSERT statements are supported.
113113
- Only `CSV` format is supported as an export format.
114-
- Partitioning (`PARTITIONED BY`) and clustering (`CLUSTERED BY`) aren't supported with EXTERN statements.
114+
- Partitioning (PARTITIONED BY) and clustering (CLUSTERED BY) aren't supported with EXTERN statements.
115115
- You can export to Amazon S3, Google GCS, or local storage.
116116
- The destination provided should contain no other files or directories.
117117

118118
When you export data, use the `rowsPerPage` context parameter to restrict the size of exported files.
119119
When the number of rows in the result set exceeds the value of the parameter, Druid splits the output into multiple files.
120+
The following statement shows the format of a SQL query using EXTERN to export rows:
120121

121122
```sql
123+
SET rowsPerPage=<number_of_rows>;
122124
INSERT INTO
123125
EXTERN(<destination function>)
124126
AS CSV
@@ -127,6 +129,9 @@ SELECT
127129
FROM <table>
128130
```
129131

132+
For details on applying context parameters using SET, see [SET statements](../querying/sql.md#set-statements).
133+
134+
130135
##### S3 - Amazon S3
131136

132137
To export results to S3, pass the `s3()` function as an argument to the `EXTERN` function.
@@ -501,10 +506,15 @@ When using the sort-merge algorithm, keep the following in mind:
501506

502507
- All join types are supported with `sortMerge`: LEFT, RIGHT, INNER, FULL, and CROSS.
503508

504-
The following example runs using a single sort-merge join stage that receives `eventstream`
505-
(partitioned on `user_id`) and `users` (partitioned on `id`) as inputs. There is no limit on the size of either input.
509+
The following query runs a single sort-merge join stage that takes the following inputs:
510+
* `eventstream` partitioned on `user_id`
511+
* `users` partitioned on `id`
512+
513+
There is no limit on the size of either input.
514+
The SET command assigns the `sqlJoinAlgorithm` context parameter so that Druid uses the sort-merge join algorithm for the query.
506515

507516
```sql
517+
SET sqlJoinAlgorithm='sortMerge';
508518
REPLACE INTO eventstream_enriched
509519
OVERWRITE ALL
510520
SELECT
@@ -519,8 +529,6 @@ PARTITIONED BY HOUR
519529
CLUSTERED BY user
520530
```
521531

522-
The context parameter that sets `sqlJoinAlgorithm` to `sortMerge` is not shown in the above example.
523-
524532
## Durable storage
525533

526534
SQL-based ingestion supports using durable storage to store intermediate files temporarily. Enabling it can improve reliability. For more information, see [Durable storage](../operations/durable-storage.md).

docs/querying/query-from-deep-storage.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ curl --location 'http://localhost:8888/druid/v2/sql/statements' \
113113
}'
114114
```
115115

116+
Note that you can also submit context parameters using [SET](../querying/sql.md#set-statements). For example:
117+
118+
```
119+
"query": "SET executionMode = '\''ASYNC'\''; SET selectDestination = '\''durableStorage'\''; SELECT * FROM \"YOUR_DATASOURCE\" WHERE \"__time\" > TIMESTAMP '\''2017-09-01'\'' AND \"__time\" <= TIMESTAMP '\''2017-09-02'\''"
120+
```
121+
116122
The response for submitting a query includes the query ID along with basic information, such as when you submitted the query and the schema of the results:
117123

118124
```json
@@ -132,7 +138,6 @@ The response for submitting a query includes the query ID along with basic infor
132138
}
133139
```
134140

135-
136141
### Get query status
137142

138143
You can check the status of a query with the following API call:

docs/querying/using-caching.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ As long as the service is set to populate the cache, you can set cache options f
8383
}
8484
}
8585
```
86-
In this example the user has set `populateCache` to `false` to avoid filling the result cache with results for segments that are over a year old. For more information, see [Druid SQL client APIs](../api-reference/sql-api.md).
8786

87+
In this example the user has set `populateCache` to `false` to avoid filling the result cache with results for segments that are over a year old. For more information, see [Druid SQL client APIs](../api-reference/sql-api.md).
8888

89+
You can also use the SET command to specify cache options directly within your SQL query string. For more information, see [SET statements](../querying/sql.md#set-statements).
8990

9091
## Learn more
9192
See the following topics for more information:

0 commit comments

Comments
 (0)