File tree Expand file tree Collapse file tree 4 files changed +95
-5
lines changed
core/reference/sql/functions
enterprise/reference/sql/functions Expand file tree Collapse file tree 4 files changed +95
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : SQL cache functions
3
+ list_title : Cache functions
4
+ description : >
5
+ Retrieve cached data from {{< product-name >}} caches.
6
+ menu :
7
+ influxdb3_core :
8
+ name : Cache
9
+ parent : sql-functions
10
+ weight : 311
11
+
12
+ source : /shared/sql-reference/functions/cache.md
13
+ ---
14
+
15
+ <!--
16
+ The content for this page is at /content/shared/sql-reference/functions/cache.md
17
+ -->
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : SQL cache functions
3
+ list_title : Cache functions
4
+ description : >
5
+ Retrieve cached data from {{< product-name >}} caches.
6
+ menu :
7
+ influxdb3_enterprise :
8
+ name : Cache
9
+ parent : sql-functions
10
+ weight : 311
11
+
12
+ source : /shared/sql-reference/functions/cache.md
13
+ ---
14
+
15
+ <!--
16
+ The content for this page is at /content/shared/sql-reference/functions/cache.md
17
+ -->
Original file line number Diff line number Diff line change 25
25
26
26
##### Schema
27
27
28
- - home <em style =" opacity : .5 " >(measurement )</em >
28
+ - home <em style =" opacity : .5 " >(table )</em >
29
29
- ** tags** :
30
30
- room
31
31
- Kitchen
208
208
209
209
##### Schema
210
210
211
- - home_actions <em style =" opacity : .5 " >(measurement )</em >
211
+ - home_actions <em style =" opacity : .5 " >(table )</em >
212
212
- ** tags** :
213
213
- room
214
214
- Kitchen
@@ -336,7 +336,7 @@ series use cases that involve seasonality.
336
336
337
337
##### Schema
338
338
339
- - weather <em style =" opacity : .5 " >(measurement )</em >
339
+ - weather <em style =" opacity : .5 " >(table )</em >
340
340
- ** tags** :
341
341
- location
342
342
- Concord
@@ -430,7 +430,7 @@ The Bitcoin price sample dataset provides Bitcoin prices from
430
430
431
431
##### Schema
432
432
433
- - bitcoin <em style =" opacity : .5 " >(measurement )</em >
433
+ - bitcoin <em style =" opacity : .5 " >(table )</em >
434
434
- ** tags** :
435
435
- code
436
436
- EUR
@@ -518,7 +518,7 @@ transformation functions.
518
518
519
519
##### Schema
520
520
521
- - numbers <em style =" opacity : .5 " >(measurement )</em >
521
+ - numbers <em style =" opacity : .5 " >(table )</em >
522
522
- ** fields**
523
523
- a <em style =" opacity : .5 " >(float between -1 and 1)</em >
524
524
- b <em style =" opacity : .5 " >(float between -3 and 3)</em >
Original file line number Diff line number Diff line change
1
+
2
+ The {{< product-name >}} SQL implementation supports the following functions
3
+ that return data from {{< product-name >}} caches.
4
+
5
+ - [ distinct_cache] ( #distinct_cache )
6
+ - [ last_cache] ( #last_cache )
7
+
8
+ ## distinct_cache
9
+
10
+ Returns data from an {{< product-name >}} distinct value cache.
11
+
12
+ ``` sql
13
+ distinct_cache(table_name, cache_name)
14
+ ```
15
+
16
+ #### Arguments
17
+
18
+ - ** table_name** : Name of the table associated with the distinct value cache
19
+ _ (formatted as a string literal)_ .
20
+ - ** datatype** : Name of the the distinct value cache to query
21
+ _ (formatted as a string literal)_ .
22
+
23
+ {{< expand-wrapper >}}
24
+ {{% expand "View ` distinct_cache ` query example" %}}
25
+
26
+ ``` sql
27
+ SELECT * FROM distinct_cache(' example_table' , ' exampleCacheName' )
28
+ ```
29
+
30
+ {{% /expand %}}
31
+ {{< /expand-wrapper >}}
32
+
33
+ ## last_cache
34
+
35
+ Returns data from an {{< product-name >}} last value cache.
36
+
37
+ ``` sql
38
+ last_cache(table_name, cache_name)
39
+ ```
40
+
41
+ #### Arguments
42
+
43
+ - ** table_name** : Name of the table associated with the last value cache
44
+ _ (formatted as a string literal)_ .
45
+ - ** datatype** : Name of the the last value cache to query
46
+ _ (formatted as a string literal)_ .
47
+
48
+ {{< expand-wrapper >}}
49
+ {{% expand "View ` last_cache ` query example" %}}
50
+
51
+ ``` sql
52
+ SELECT * FROM last_cache(' example_table' , ' exampleCacheName' )
53
+ ```
54
+
55
+ {{% /expand %}}
56
+ {{< /expand-wrapper >}}
You can’t perform that action at this time.
0 commit comments