Merge branch 'master' into feature/cloud-dedicated-user-management-docs
commit
b3ab36e2fc
|
|
@ -31,6 +31,9 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
#kapa-widget-container {
|
||||||
|
font-family: 'Proxima Nova', sans-serif;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
{{#unless disableGoogleFont}}<link
|
{{#unless disableGoogleFont}}<link
|
||||||
href="https://fonts.googleapis.com/css?family=Roboto+Mono:500,500i,700,700i|Roboto:400,400i,700,700i|Rubik:400,400i,500,500i,700,700i"
|
href="https://fonts.googleapis.com/css?family=Roboto+Mono:500,500i,700,700i|Roboto:400,400i,700,700i|Rubik:400,400i,500,500i,700,700i"
|
||||||
|
|
@ -41,6 +44,7 @@
|
||||||
<script>
|
<script>
|
||||||
// Load Kapa AI widget after DOM content is loaded
|
// Load Kapa AI widget after DOM content is loaded
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const fontFamily = 'Proxima Nova, sans-serif';
|
||||||
const askAI = document.createElement('script');
|
const askAI = document.createElement('script');
|
||||||
askAI.type = 'text/javascript';
|
askAI.type = 'text/javascript';
|
||||||
askAI.async = true;
|
askAI.async = true;
|
||||||
|
|
@ -53,8 +57,8 @@
|
||||||
askAI.setAttribute('data-project-logo', '/img/influx-logo-cubo-white.png');
|
askAI.setAttribute('data-project-logo', '/img/influx-logo-cubo-white.png');
|
||||||
askAI.setAttribute('data-modal-disclaimer', 'This AI can access [documentation for InfluxDB, clients, and related tools](https://docs.influxdata.com). Information you submit is used in accordance with our [Privacy Policy](https://www.influxdata.com/legal/privacy-policy/).');
|
askAI.setAttribute('data-modal-disclaimer', 'This AI can access [documentation for InfluxDB, clients, and related tools](https://docs.influxdata.com). Information you submit is used in accordance with our [Privacy Policy](https://www.influxdata.com/legal/privacy-policy/).');
|
||||||
askAI.setAttribute('data-modal-example-questions', 'How do I write and query data with the {{title}}?, How do I use client libraries for the {{title}}?');
|
askAI.setAttribute('data-modal-example-questions', 'How do I write and query data with the {{title}}?, How do I use client libraries for the {{title}}?');
|
||||||
askAI.setAttribute('data-button-height', '65px');
|
askAI.setAttribute('data-button-height', '50px');
|
||||||
askAI.setAttribute('data-button-width', '65px');
|
askAI.setAttribute('data-button-width', '50px');
|
||||||
if (window.matchMedia('(max-width: 800px)').matches) {
|
if (window.matchMedia('(max-width: 800px)').matches) {
|
||||||
// For mobile devices (smaller than 600px)
|
// For mobile devices (smaller than 600px)
|
||||||
askAI.setAttribute('data-button-position-bottom', '130px');
|
askAI.setAttribute('data-button-position-bottom', '130px');
|
||||||
|
|
@ -62,25 +66,23 @@
|
||||||
// For larger screens
|
// For larger screens
|
||||||
askAI.setAttribute('data-button-position-bottom', '20px');
|
askAI.setAttribute('data-button-position-bottom', '20px');
|
||||||
}
|
}
|
||||||
|
askAI.setAttribute('data-button-text-font-family', fontFamily);
|
||||||
|
askAI.setAttribute('data-button-text-font-size', '12.8px');
|
||||||
askAI.setAttribute('data-button-text', 'Ask AI');
|
askAI.setAttribute('data-button-text', 'Ask AI');
|
||||||
askAI.setAttribute('data-conversation-button-icons-only', 'true');
|
askAI.setAttribute('data-conversation-button-icons-only', 'true');
|
||||||
askAI.setAttribute('data-font-family', 'Proxima Nova, sans-serif');
|
askAI.setAttribute('data-font-family', fontFamily);
|
||||||
askAI.setAttribute('data-modal-example-questions-col-span', '8');
|
askAI.setAttribute('data-modal-example-questions-col-span', '8');
|
||||||
askAI.setAttribute('data-modal-full-screen-on-mobile', 'true');
|
askAI.setAttribute('data-modal-full-screen-on-mobile', 'true');
|
||||||
askAI.setAttribute('data-modal-header-bg-color', '#d30971');
|
askAI.setAttribute('data-modal-header-bg-color', '#d30971');
|
||||||
askAI.setAttribute('data-modal-header-border-bottom', 'none');
|
askAI.setAttribute('data-modal-header-border-bottom', 'none');
|
||||||
askAI.setAttribute('data-modal-header-padding', '.5rem');
|
askAI.setAttribute('data-modal-header-padding', '.5rem');
|
||||||
askAI.setAttribute('data-modal-header-text-color', '#ffffff');
|
askAI.setAttribute('data-modal-header-text-color', '#ffffff');
|
||||||
askAI.setAttribute('data-modal-x-offset', '0');
|
askAI.setAttribute('data-modal-size', '640px');
|
||||||
askAI.setAttribute('data-modal-y-offset', '0');
|
askAI.setAttribute('data-modal-y-offset', '0');
|
||||||
askAI.setAttribute('data-modal-with-overlay', 'false');
|
askAI.setAttribute('data-modal-with-overlay', 'false');
|
||||||
askAI.setAttribute('data-modal-inner-flex-direction', 'column');
|
askAI.setAttribute('data-modal-inner-flex-direction', 'column');
|
||||||
askAI.setAttribute('data-modal-inner-justify-content', 'end');
|
askAI.setAttribute('data-modal-inner-justify-content', 'end');
|
||||||
askAI.setAttribute('data-modal-inner-max-width', '600px');
|
|
||||||
askAI.setAttribute('data-modal-inner-position-left', 'auto');
|
|
||||||
askAI.setAttribute('data-modal-inner-position-right', '50px');
|
|
||||||
askAI.setAttribute('data-modal-inner-position-bottom', 'calc(2.5rem + 25px)');
|
askAI.setAttribute('data-modal-inner-position-bottom', 'calc(2.5rem + 25px)');
|
||||||
askAI.setAttribute('data-modal-size', '640px');
|
|
||||||
askAI.setAttribute('data-modal-title-color', '#fff');
|
askAI.setAttribute('data-modal-title-color', '#fff');
|
||||||
askAI.setAttribute('data-modal-title-font-size', '1.25rem');
|
askAI.setAttribute('data-modal-title-font-size', '1.25rem');
|
||||||
askAI.setAttribute('data-modal-lock-scroll', 'false');
|
askAI.setAttribute('data-modal-lock-scroll', 'false');
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ function initializeChat({ onChatLoad, chatAttributes }) {
|
||||||
modalOverrideOpenClassAskAi: 'ask-ai-open',
|
modalOverrideOpenClassAskAi: 'ask-ai-open',
|
||||||
modalSize: '640px',
|
modalSize: '640px',
|
||||||
modalWithOverlay: 'false',
|
modalWithOverlay: 'false',
|
||||||
modalInnerMaxWidth: '800px',
|
|
||||||
modalXOffset: 'calc(100% - 800px - (40rem * var(--mantine-scale))',
|
|
||||||
modalYOffset: '10vh',
|
modalYOffset: '10vh',
|
||||||
userAnalyticsFingerprintEnabled: 'true',
|
userAnalyticsFingerprintEnabled: 'true',
|
||||||
fontFamily: 'Proxima Nova, sans-serif',
|
fontFamily: 'Proxima Nova, sans-serif',
|
||||||
|
|
|
||||||
18
compose.yaml
18
compose.yaml
|
|
@ -307,6 +307,7 @@ services:
|
||||||
influxdb3-core:
|
influxdb3-core:
|
||||||
container_name: influxdb3-core
|
container_name: influxdb3-core
|
||||||
image: influxdb:3-core
|
image: influxdb:3-core
|
||||||
|
pull_policy: always
|
||||||
# Set variables (except your auth token) for Core in the .env.3core file.
|
# Set variables (except your auth token) for Core in the .env.3core file.
|
||||||
env_file:
|
env_file:
|
||||||
- .env.3core
|
- .env.3core
|
||||||
|
|
@ -316,17 +317,21 @@ services:
|
||||||
- influxdb3
|
- influxdb3
|
||||||
- serve
|
- serve
|
||||||
- --node-id=node0
|
- --node-id=node0
|
||||||
- --log-filter=debug
|
|
||||||
- --object-store=file
|
- --object-store=file
|
||||||
- --data-dir=/var/lib/influxdb3/data
|
- --data-dir=/var/lib/influxdb3/data
|
||||||
- --plugin-dir=/var/lib/influxdb3/plugins
|
- --plugin-dir=/var/lib/influxdb3/plugins
|
||||||
|
- --log-filter=debug
|
||||||
|
- --verbose
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: test/.influxdb3/core/data
|
source: test/.influxdb3/core/data
|
||||||
target: /var/lib/influxdb3/data
|
target: /var/lib/influxdb3/data
|
||||||
- type: bind
|
- type: bind
|
||||||
source: test/.influxdb3/core/plugins
|
source: test/.influxdb3/plugins/influxdata
|
||||||
target: /var/lib/influxdb3/plugins
|
target: /var/lib/influxdb3/plugins
|
||||||
|
- type: bind
|
||||||
|
source: test/.influxdb3/core/plugins
|
||||||
|
target: /var/lib/influxdb3/plugins/custom
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-core-admin-token
|
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-core-admin-token
|
||||||
secrets:
|
secrets:
|
||||||
|
|
@ -334,6 +339,7 @@ services:
|
||||||
influxdb3-enterprise:
|
influxdb3-enterprise:
|
||||||
container_name: influxdb3-enterprise
|
container_name: influxdb3-enterprise
|
||||||
image: influxdb:3-enterprise
|
image: influxdb:3-enterprise
|
||||||
|
pull_policy: always
|
||||||
# Set license email and other variables (except your auth token) for Enterprise in the .env.3ent file.
|
# Set license email and other variables (except your auth token) for Enterprise in the .env.3ent file.
|
||||||
env_file:
|
env_file:
|
||||||
- .env.3ent
|
- .env.3ent
|
||||||
|
|
@ -344,10 +350,11 @@ services:
|
||||||
- serve
|
- serve
|
||||||
- --node-id=node0
|
- --node-id=node0
|
||||||
- --cluster-id=cluster0
|
- --cluster-id=cluster0
|
||||||
- --log-filter=debug
|
|
||||||
- --object-store=file
|
- --object-store=file
|
||||||
- --data-dir=/var/lib/influxdb3/data
|
- --data-dir=/var/lib/influxdb3/data
|
||||||
- --plugin-dir=/var/lib/influxdb3/plugins
|
- --plugin-dir=/var/lib/influxdb3/plugins
|
||||||
|
- --log-filter=debug
|
||||||
|
- --verbose
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-enterprise-admin-token
|
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-enterprise-admin-token
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -355,8 +362,11 @@ services:
|
||||||
source: test/.influxdb3/enterprise/data
|
source: test/.influxdb3/enterprise/data
|
||||||
target: /var/lib/influxdb3/data
|
target: /var/lib/influxdb3/data
|
||||||
- type: bind
|
- type: bind
|
||||||
source: test/.influxdb3/enterprise/plugins
|
source: test/.influxdb3/plugins/influxdata
|
||||||
target: /var/lib/influxdb3/plugins
|
target: /var/lib/influxdb3/plugins
|
||||||
|
- type: bind
|
||||||
|
source: test/.influxdb3/enterprise/plugins
|
||||||
|
target: /var/lib/influxdb3/plugins/custom
|
||||||
secrets:
|
secrets:
|
||||||
- influxdb3-enterprise-admin-token
|
- influxdb3-enterprise-admin-token
|
||||||
telegraf-pytest:
|
telegraf-pytest:
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ source: /shared/sql-reference/functions/_index.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/_index.md
|
// SOURCE content/shared/sql-reference/functions/_index.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/aggregate.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/aggregate.md
|
// SOURCE content/shared/sql-reference/functions/aggregate.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL array functions
|
||||||
|
list_title: Array functions
|
||||||
|
description: >
|
||||||
|
Use array functions to create and operate on Arrow arrays or lists in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_dedicated:
|
||||||
|
name: Array
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 309
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/array.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/array.md
|
||||||
|
-->
|
||||||
|
|
@ -14,6 +14,5 @@ source: /shared/sql-reference/functions/binary-string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at
|
// SOURCE content/shared/sql-reference/functions/binary-string.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/binary-string.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/conditional.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/conditional.md
|
// SOURCE content/shared/sql-reference/functions/conditional.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ menu:
|
||||||
influxdb3_cloud_dedicated:
|
influxdb3_cloud_dedicated:
|
||||||
name: Hashing
|
name: Hashing
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 313
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/hashing.md
|
source: /shared/sql-reference/functions/hashing.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at
|
// SOURCE content/shared/sql-reference/functions/hashing.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/hashing.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL map functions
|
||||||
|
list_title: Map functions
|
||||||
|
description: >
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_dedicated:
|
||||||
|
name: Map
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 310
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/map.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/map.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/math.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/math.md
|
// SOURCE content/shared/sql-reference/functions/math.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ menu:
|
||||||
influxdb3_cloud_dedicated:
|
influxdb3_cloud_dedicated:
|
||||||
name: Miscellaneous
|
name: Miscellaneous
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 310
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/misc.md
|
source: /shared/sql-reference/functions/misc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/misc.md
|
// SOURCE content/shared/sql-reference/functions/misc.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ menu:
|
||||||
influxdb3_cloud_dedicated:
|
influxdb3_cloud_dedicated:
|
||||||
name: Regular expression
|
name: Regular expression
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 308
|
weight: 312
|
||||||
influxdb3/cloud-dedicated/tags: [regular expressions, sql]
|
influxdb3/cloud-dedicated/tags: [regular expressions, sql]
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/regular-expression.md
|
source: /shared/sql-reference/functions/regular-expression.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/regular-expression.md
|
// SOURCE content/shared/sql-reference/functions/regular-expression.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/selector.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/selector.md
|
// SOURCE content/shared/sql-reference/functions/selector.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/string.md
|
// SOURCE content/shared/sql-reference/functions/string.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL struct functions
|
||||||
|
list_title: Struct functions
|
||||||
|
description: >
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_dedicated:
|
||||||
|
name: Struct
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 311
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/struct.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/struct.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/time-and-date.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/time-and-date.md
|
// SOURCE content/shared/sql-reference/functions/time-and-date.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ menu:
|
||||||
influxdb3_cloud_dedicated:
|
influxdb3_cloud_dedicated:
|
||||||
name: Window
|
name: Window
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 315
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/window.md
|
source: /shared/sql-reference/functions/window.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at content/shared/sql-reference/functions/window.md
|
// SOURCE content/shared/sql-reference/functions/window.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ source: /shared/sql-reference/functions/_index.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/_index.md
|
// SOURCE content/shared/sql-reference/functions/_index.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/aggregate.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/aggregate.md
|
// SOURCE content/shared/sql-reference/functions/aggregate.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL array functions
|
||||||
|
list_title: Array functions
|
||||||
|
description: >
|
||||||
|
Use array functions to create and operate on Arrow arrays or lists in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_serverless:
|
||||||
|
name: Array
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 309
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/array.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/array.md
|
||||||
|
-->
|
||||||
|
|
@ -14,6 +14,5 @@ source: /shared/sql-reference/functions/binary-string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at
|
// SOURCE content/shared/sql-reference/functions/binary-string.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/binary-string.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/conditional.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/conditional.md
|
// SOURCE content/shared/sql-reference/functions/conditional.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ menu:
|
||||||
influxdb3_cloud_serverless:
|
influxdb3_cloud_serverless:
|
||||||
name: Hashing
|
name: Hashing
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 313
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/hashing.md
|
source: /shared/sql-reference/functions/hashing.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at
|
// SOURCE content/shared/sql-reference/functions/hashing.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/hashing.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL map functions
|
||||||
|
list_title: Map functions
|
||||||
|
description: >
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_serverless:
|
||||||
|
name: Map
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 310
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/map.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/map.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/math.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/math.md
|
// SOURCE content/shared/sql-reference/functions/math.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,11 +7,11 @@ menu:
|
||||||
influxdb3_cloud_serverless:
|
influxdb3_cloud_serverless:
|
||||||
name: Miscellaneous
|
name: Miscellaneous
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 310
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/misc.md
|
source: /shared/sql-reference/functions/misc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/misc.md
|
// SOURCE content/shared/sql-reference/functions/misc.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,12 +7,12 @@ menu:
|
||||||
influxdb3_cloud_serverless:
|
influxdb3_cloud_serverless:
|
||||||
name: Regular expression
|
name: Regular expression
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 308
|
weight: 312
|
||||||
influxdb3/cloud-serverless/tags: [regular expressions, sql]
|
influxdb3/cloud-serverless/tags: [regular expressions, sql]
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/regular-expression.md
|
source: /shared/sql-reference/functions/regular-expression.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/regular-expression.md
|
// SOURCE content/shared/sql-reference/functions/regular-expression.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/selector.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/selector.md
|
// SOURCE content/shared/sql-reference/functions/selector.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/string.md
|
// SOURCE content/shared/sql-reference/functions/string.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL struct functions
|
||||||
|
list_title: Struct functions
|
||||||
|
description: >
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_cloud_serverless:
|
||||||
|
name: Struct
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 311
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/struct.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/struct.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/time-and-date.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/time-and-date.md
|
// SOURCE content/shared/sql-reference/functions/time-and-date.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ menu:
|
||||||
influxdb3_cloud_serverless:
|
influxdb3_cloud_serverless:
|
||||||
name: Window
|
name: Window
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 315
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/window.md
|
source: /shared/sql-reference/functions/window.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at content/shared/sql-reference/functions/window.md
|
// SOURCE content/shared/sql-reference/functions/window.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ source: /shared/sql-reference/functions/_index.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/_index.md
|
// SOURCE content/shared/sql-reference/functions/_index.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/aggregate.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/aggregate.md
|
// SOURCE content/shared/sql-reference/functions/aggregate.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL array functions
|
||||||
|
list_title: Array functions
|
||||||
|
description: >
|
||||||
|
Use array functions to create and operate on Arrow arrays or lists in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_clustered:
|
||||||
|
name: Array
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 309
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/array.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/array.md
|
||||||
|
-->
|
||||||
|
|
@ -14,6 +14,5 @@ source: /shared/sql-reference/functions/binary-string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at
|
// SOURCE content/shared/sql-reference/functions/binary-string.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/binary-string.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/conditional.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/conditional.md
|
// SOURCE content/shared/sql-reference/functions/conditional.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ menu:
|
||||||
influxdb3_clustered:
|
influxdb3_clustered:
|
||||||
name: Hashing
|
name: Hashing
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 313
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/hashing.md
|
source: /shared/sql-reference/functions/hashing.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at
|
// SOURCE content/shared/sql-reference/functions/hashing.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/hashing.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL map functions
|
||||||
|
list_title: Map functions
|
||||||
|
description: >
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_clustered:
|
||||||
|
name: Map
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 310
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/map.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/map.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/math.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/math.md
|
// SOURCE content/shared/sql-reference/functions/math.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,11 +7,11 @@ menu:
|
||||||
influxdb3_clustered:
|
influxdb3_clustered:
|
||||||
name: Miscellaneous
|
name: Miscellaneous
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 310
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/misc.md
|
source: /shared/sql-reference/functions/misc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/misc.md
|
// SOURCE content/shared/sql-reference/functions/misc.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,12 +7,12 @@ menu:
|
||||||
influxdb3_clustered:
|
influxdb3_clustered:
|
||||||
name: Regular expression
|
name: Regular expression
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 308
|
weight: 312
|
||||||
influxdb3/clustered/tags: [regular expressions, sql]
|
influxdb3/clustered/tags: [regular expressions, sql]
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/regular-expression.md
|
source: /shared/sql-reference/functions/regular-expression.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/regular-expression.md
|
// SOURCE content/shared/sql-reference/functions/regular-expression.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/selector.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/selector.md
|
// SOURCE content/shared/sql-reference/functions/selector.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/string.md
|
// SOURCE content/shared/sql-reference/functions/string.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL struct functions
|
||||||
|
list_title: Struct functions
|
||||||
|
description: >
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_clustered:
|
||||||
|
name: Struct
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 311
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/struct.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/struct.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/time-and-date.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/time-and-date.md
|
// SOURCE content/shared/sql-reference/functions/time-and-date.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ menu:
|
||||||
influxdb3_clustered:
|
influxdb3_clustered:
|
||||||
name: Window
|
name: Window
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 315
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/window.md
|
source: /shared/sql-reference/functions/window.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at content/shared/sql-reference/functions/window.md
|
// SOURCE content/shared/sql-reference/functions/window.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ source: /shared/sql-reference/functions/_index.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/_index.md
|
// SOURCE content/shared/sql-reference/functions/_index.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/aggregate.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/aggregate.md
|
// SOURCE content/shared/sql-reference/functions/aggregate.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL array functions
|
||||||
|
list_title: Array functions
|
||||||
|
description: >
|
||||||
|
Use array functions to create and operate on Arrow arrays or lists in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_core:
|
||||||
|
name: Array
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 309
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/array.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/array.md
|
||||||
|
-->
|
||||||
|
|
@ -14,6 +14,5 @@ source: /shared/sql-reference/functions/binary-string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at
|
// SOURCE content/shared/sql-reference/functions/binary-string.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/binary-string.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ menu:
|
||||||
influxdb3_core:
|
influxdb3_core:
|
||||||
name: Cache
|
name: Cache
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 311
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/cache.md
|
source: /shared/sql-reference/functions/cache.md
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/conditional.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/conditional.md
|
// SOURCE content/shared/sql-reference/functions/conditional.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ menu:
|
||||||
influxdb3_core:
|
influxdb3_core:
|
||||||
name: Hashing
|
name: Hashing
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 313
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/hashing.md
|
source: /shared/sql-reference/functions/hashing.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at
|
// SOURCE content/shared/sql-reference/functions/hashing.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/hashing.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL map functions
|
||||||
|
list_title: Map functions
|
||||||
|
description: >
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_core:
|
||||||
|
name: Map
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 310
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/map.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/map.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/math.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/math.md
|
// SOURCE content/shared/sql-reference/functions/math.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,11 +7,11 @@ menu:
|
||||||
influxdb3_core:
|
influxdb3_core:
|
||||||
name: Miscellaneous
|
name: Miscellaneous
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 310
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/misc.md
|
source: /shared/sql-reference/functions/misc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/misc.md
|
// SOURCE content/shared/sql-reference/functions/misc.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,12 +7,12 @@ menu:
|
||||||
influxdb3_core:
|
influxdb3_core:
|
||||||
name: Regular expression
|
name: Regular expression
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 308
|
weight: 312
|
||||||
influxdb3/core/tags: [regular expressions, sql]
|
influxdb3/core/tags: [regular expressions, sql]
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/regular-expression.md
|
source: /shared/sql-reference/functions/regular-expression.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/regular-expression.md
|
// SOURCE content/shared/sql-reference/functions/regular-expression.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/selector.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/selector.md
|
// SOURCE content/shared/sql-reference/functions/selector.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/string.md
|
// SOURCE content/shared/sql-reference/functions/string.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL struct functions
|
||||||
|
list_title: Struct functions
|
||||||
|
description: >
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_core:
|
||||||
|
name: Struct
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 311
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/struct.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/struct.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/time-and-date.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/time-and-date.md
|
// SOURCE content/shared/sql-reference/functions/time-and-date.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ menu:
|
||||||
influxdb3_core:
|
influxdb3_core:
|
||||||
name: Window
|
name: Window
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 315
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/window.md
|
source: /shared/sql-reference/functions/window.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at content/shared/sql-reference/functions/window.md
|
// SOURCE content/shared/sql-reference/functions/window.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ source: /shared/sql-reference/functions/_index.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/_index.md
|
// SOURCE content/shared/sql-reference/functions/_index.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/aggregate.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/aggregate.md
|
// SOURCE content/shared/sql-reference/functions/aggregate.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL array functions
|
||||||
|
list_title: Array functions
|
||||||
|
description: >
|
||||||
|
Use array functions to create and operate on Arrow arrays or lists in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_enterprise:
|
||||||
|
name: Array
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 309
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/array.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/array.md
|
||||||
|
-->
|
||||||
|
|
@ -14,6 +14,5 @@ source: /shared/sql-reference/functions/binary-string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at
|
// SOURCE content/shared/sql-reference/functions/binary-string.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/binary-string.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ menu:
|
||||||
influxdb3_enterprise:
|
influxdb3_enterprise:
|
||||||
name: Cache
|
name: Cache
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 311
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/cache.md
|
source: /shared/sql-reference/functions/cache.md
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/conditional.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/conditional.md
|
// SOURCE content/shared/sql-reference/functions/conditional.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ menu:
|
||||||
influxdb3_enterprise:
|
influxdb3_enterprise:
|
||||||
name: Hashing
|
name: Hashing
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 313
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/hashing.md
|
source: /shared/sql-reference/functions/hashing.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at
|
// SOURCE content/shared/sql-reference/functions/hashing.md
|
||||||
// SOURCE /content/shared/sql-reference/functions/hashing.md
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL map functions
|
||||||
|
list_title: Map functions
|
||||||
|
description: >
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_enterprise:
|
||||||
|
name: Map
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 310
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/map.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/map.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/math.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/math.md
|
// SOURCE content/shared/sql-reference/functions/math.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,11 +7,11 @@ menu:
|
||||||
influxdb3_enterprise:
|
influxdb3_enterprise:
|
||||||
name: Miscellaneous
|
name: Miscellaneous
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 310
|
weight: 314
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/misc.md
|
source: /shared/sql-reference/functions/misc.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/misc.md
|
// SOURCE content/shared/sql-reference/functions/misc.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -7,12 +7,12 @@ menu:
|
||||||
influxdb3_enterprise:
|
influxdb3_enterprise:
|
||||||
name: Regular expression
|
name: Regular expression
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 308
|
weight: 312
|
||||||
influxdb3/enterprise/tags: [regular expressions, sql]
|
influxdb3/enterprise/tags: [regular expressions, sql]
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/regular-expression.md
|
source: /shared/sql-reference/functions/regular-expression.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/regular-expression.md
|
// SOURCE content/shared/sql-reference/functions/regular-expression.md
|
||||||
-->
|
-->
|
||||||
|
|
@ -15,5 +15,5 @@ source: /shared/sql-reference/functions/selector.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/selector.md
|
// SOURCE content/shared/sql-reference/functions/selector.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/string.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/string.md
|
// SOURCE content/shared/sql-reference/functions/string.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: SQL struct functions
|
||||||
|
list_title: Struct functions
|
||||||
|
description: >
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
menu:
|
||||||
|
influxdb3_enterprise:
|
||||||
|
name: Struct
|
||||||
|
parent: sql-functions
|
||||||
|
weight: 311
|
||||||
|
|
||||||
|
source: /shared/sql-reference/functions/struct.md
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
// SOURCE content/shared/sql-reference/functions/struct.md
|
||||||
|
-->
|
||||||
|
|
@ -13,5 +13,5 @@ source: /shared/sql-reference/functions/time-and-date.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/sql-reference/functions/time-and-date.md
|
// SOURCE content/shared/sql-reference/functions/time-and-date.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ menu:
|
||||||
influxdb3_enterprise:
|
influxdb3_enterprise:
|
||||||
name: Window
|
name: Window
|
||||||
parent: sql-functions
|
parent: sql-functions
|
||||||
weight: 309
|
weight: 315
|
||||||
|
|
||||||
source: /shared/sql-reference/functions/window.md
|
source: /shared/sql-reference/functions/window.md
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content for this page is at content/shared/sql-reference/functions/window.md
|
// SOURCE content/shared/sql-reference/functions/window.md
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
|
|
@ -11,301 +11,533 @@ weight: 2
|
||||||
Use [Docker](https://docker.com) to install and run **InfluxDB 3 Explorer**.
|
Use [Docker](https://docker.com) to install and run **InfluxDB 3 Explorer**.
|
||||||
|
|
||||||
<!-- BEGIN TOC -->
|
<!-- BEGIN TOC -->
|
||||||
- [Run the InfluxDB 3 Explorer Docker container](#run-the-influxdb-3-explorer-docker-container)
|
- [Quick start](#quick-start)
|
||||||
- [Enable TLS/SSL (HTTPS)](#enable-tlsssl-https)
|
- [Installation methods](#installation-methods)
|
||||||
- [Pre-configure InfluxDB connection settings](#pre-configure-influxdb-connection-settings)
|
- [Configuration options](#configuration-options)
|
||||||
- [Run in query or admin mode](#run-in-query-or-admin-mode)
|
- [Persist data across restarts](#persist-data-across-restarts)
|
||||||
- [Run in query mode](#run-in-query-mode)
|
- [Pre-configure InfluxDB connections](#pre-configure-influxdb-connections)
|
||||||
- [Run in admin mode](#run-in-admin-mode)
|
- [Enable TLS/SSL (HTTPS)](#enable-tlsssl-https)
|
||||||
- [Environment Variables](#environment-variables)
|
- [Choose operational mode](#choose-operational-mode)
|
||||||
- [Volume Reference](#volume-reference)
|
- [Advanced configuration](#advanced-configuration)
|
||||||
- [Exposed Ports](#exposed-ports)
|
- [Environment variables](#environment-variables)
|
||||||
- [Custom port mapping](#custom-port-mapping)
|
- [Volume reference](#volume-reference)
|
||||||
|
- [Port reference](#port-reference)
|
||||||
|
- [Complete examples](#complete-examples)
|
||||||
<!-- END TOC -->
|
<!-- END TOC -->
|
||||||
|
|
||||||
## Run the InfluxDB 3 Explorer Docker container
|
## Quick start
|
||||||
|
|
||||||
1. **Install Docker**
|
Get {{% product-name %}} running in minutes:
|
||||||
|
|
||||||
If you haven't already, install [Docker](https://docs.docker.com/engine/) or
|
1. **Run the Explorer container:**
|
||||||
[Docker Desktop](https://docs.docker.com/desktop/).
|
|
||||||
|
|
||||||
2. **Pull the {{% product-name %}} Docker image**
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
2. **Access the Explorer UI at <http://localhost:8888>**
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Create local directories** _(optional)_
|
3. **[Configure your InfluxDB connection in the UI](/influxdb3/explorer/get-started)**
|
||||||
|
|
||||||
{{% product-name %}} can mount the following directories on your local
|
|
||||||
machine:
|
|
||||||
|
|
||||||
| Directory | Description | Permissions |
|
|
||||||
| :--------- | :------------------------------------------------------------------------------------------------ | :---------: |
|
|
||||||
| `./db` | Stores {{% product-name %}} application data | 700 |
|
|
||||||
| `./config` | Stores [pre-configured InfluxDB connection settings](#pre-configure-influxdb-connection-settings) | 755 |
|
|
||||||
| `./ssl` | Stores TLS/SSL certificates _(Required when [using TLS/SSL](#enable-tlsssl-https))_ | 755 |
|
|
||||||
|
|
||||||
> [!Important]
|
|
||||||
> If you don't create and mount a local `./db` directory, {{% product-name %}}
|
|
||||||
> stores application data in the container's file system.
|
|
||||||
> This data will be lost when the container is deleted.
|
|
||||||
|
|
||||||
To create these directories with the appropriate permissions, run the
|
|
||||||
following commands from your current working directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -m 700 ./db
|
|
||||||
mkdir -m 755 ./config
|
|
||||||
mkdir -m 755 ./ssl
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Run the {{% product-name %}} container**
|
|
||||||
|
|
||||||
Use the `docker run` command to start the {{% product-name %}} container.
|
|
||||||
Include the following:
|
|
||||||
|
|
||||||
- Port mappings:
|
|
||||||
- `8888` to `80` (or `443` if using TLS/SSL)
|
|
||||||
- `8889` to `8888`
|
|
||||||
- Mounted volumes:
|
|
||||||
- `$(pwd)/db:/db:rw`
|
|
||||||
- `$(pwd)/config:/app-root/config:ro`
|
|
||||||
- `$(pwd)/ssl:/etc/nginx/ssl:ro`
|
|
||||||
- Any of the available [environment variables](#environment-variables)
|
|
||||||
|
|
||||||
> [!Note]
|
|
||||||
> To persist sessions across container restarts, see the detailed instructions
|
|
||||||
> on setting the [`SESSION_SECRET_KEY` environment variable](#session_secret_key).
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --detach \
|
|
||||||
--name influxdb3-explorer \
|
|
||||||
--publish 8888:80 \
|
|
||||||
--publish 8889:8888 \
|
|
||||||
--volume $(pwd)/config:/app-root/config:ro \
|
|
||||||
--volume $(pwd)/db:/db:rw \
|
|
||||||
--volume $(pwd)/ssl:/etc/nginx/ssl:ro \
|
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}} \
|
|
||||||
--mode=admin
|
|
||||||
```
|
|
||||||
|
|
||||||
5. **Access the {{% product-name %}} user interface (UI) at <http://localhost:8888>**.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Enable TLS/SSL (HTTPS)
|
## Installation methods
|
||||||
|
|
||||||
To enable TLS/SSL, mount valid certificate and key files into the container:
|
### Prerequisites
|
||||||
|
|
||||||
1. **Place your TLS/SSL certificate files your local `./ssl` directory**
|
Install [Docker](https://docs.docker.com/engine/) or [Docker Desktop](https://docs.docker.com/desktop/) if you haven't already.
|
||||||
|
|
||||||
Required files:
|
### Basic setup
|
||||||
|
|
||||||
- Certificate: `server.crt` or `fullchain.pem`
|
> [!Tip]
|
||||||
- Private key: `server.key`
|
> To get the latest updates, run the following command before starting the container:
|
||||||
|
>
|
||||||
|
> ```bash
|
||||||
|
> docker pull influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
> ```
|
||||||
|
|
||||||
2. **When running your container, mount the SSL directory and map port 443 to port 8888**
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker run](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
Include the following options when running your Docker container:
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
```sh
|
{{% code-tab-content %}}
|
||||||
--volume $(pwd)/ssl:/etc/nginx/ssl:ro \
|
```yaml
|
||||||
--publish 8888:443
|
# docker-compose.yml
|
||||||
```
|
version: '3.8'
|
||||||
|
|
||||||
The nginx web server automatically uses certificate files when they are present
|
services:
|
||||||
in the mounted path.
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
> [!Note]
|
container_name: influxdb3-explorer
|
||||||
> You can use a custom location for certificate and key files.
|
ports:
|
||||||
> Use the [`SSL_CERT_PATH`](#ssl_cert_path) and [`SSL_KEY_PATH`](#ssl_key_path)
|
- "8888:80"
|
||||||
> environment variables to identify the custom location.
|
volumes:
|
||||||
> Also update the SSL directory volume mount path inside the container.
|
- ./config:/app-root/config:ro
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Pre-configure InfluxDB connection settings
|
|
||||||
|
|
||||||
You can predefine InfluxDB connection settings using a `config.json` file.
|
|
||||||
|
|
||||||
{{% code-placeholders "INFLUXDB3_HOST|INFLUXDB_DATABASE_NAME|INFLUXDB3_AUTH_TOKEN|INFLUXDB3_SERVER_NAME" %}}
|
|
||||||
|
|
||||||
1. **Create a `config.json` file in your local `./config` directory**
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"DEFAULT_INFLUX_SERVER": "INFLUXDB3_HOST",
|
|
||||||
"DEFAULT_INFLUX_DATABASE": "INFLUXDB_DATABASE_NAME",
|
|
||||||
"DEFAULT_API_TOKEN": "INFLUXDB3_AUTH_TOKEN",
|
|
||||||
"DEFAULT_SERVER_NAME": "INFLUXDB3_SERVER_NAME"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!Important]
|
|
||||||
> If connecting to an InfluxDB 3 Core or Enterprise instance running on
|
|
||||||
> localhost (outside of the container), use the internal Docker network to
|
|
||||||
> in your InfluxDB 3 host value--for example:
|
|
||||||
>
|
|
||||||
> ```txt
|
|
||||||
> http://host.docker.internal:8181
|
|
||||||
> ```
|
|
||||||
|
|
||||||
2. **Mount the configuration directory**
|
|
||||||
|
|
||||||
Include the following option when running your Docker container:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
--volume $(pwd)/config:/app-root/config:ro
|
|
||||||
```
|
|
||||||
|
|
||||||
{{% /code-placeholders %}}
|
|
||||||
|
|
||||||
These settings will be used as defaults when the container starts.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Run in query or admin mode
|
|
||||||
|
|
||||||
{{% product-name %}} has the following operational modes:
|
|
||||||
|
|
||||||
- **Query mode (default):** Read-only UI and query interface
|
|
||||||
- **Admin mode:** Full UI and API access for administrators
|
|
||||||
|
|
||||||
You can control the operational mode using the `--mode=` option in your
|
|
||||||
`docker run` command (after the image name).
|
|
||||||
|
|
||||||
### Run in query mode {note="(default)"}
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run \
|
|
||||||
...
|
|
||||||
--mode=query
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run in admin mode
|
Start the container:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
docker run \
|
docker-compose up -d
|
||||||
...
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
### Production setup
|
||||||
|
|
||||||
|
For production deployments with persistence, admin mode, and automatic image updates:
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker run](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--pull always \
|
||||||
|
--publish 8888:80 \
|
||||||
|
--volume $(pwd)/db:/db:rw \
|
||||||
|
--volume $(pwd)/config:/app-root/config:ro \
|
||||||
|
--env SESSION_SECRET_KEY=$(openssl rand -hex 32) \
|
||||||
|
--restart unless-stopped \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}} \
|
||||||
--mode=admin
|
--mode=admin
|
||||||
```
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
If `--mode` is not set, the container defaults to query mode.
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
# docker-compose.yml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
|
pull_policy: always
|
||||||
|
command: ["--mode=admin"]
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
|
volumes:
|
||||||
|
- ./db:/db:rw
|
||||||
|
- ./config:/app-root/config:ro
|
||||||
|
- ./ssl:/etc/nginx/ssl:ro
|
||||||
|
environment:
|
||||||
|
SESSION_SECRET_KEY: ${SESSION_SECRET_KEY:-changeme123456789012345678901234}
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a `.env` file that contains the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
SESSION_SECRET_KEY=your_32_char_hex_string_here
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Environment Variables
|
## Configuration options
|
||||||
|
|
||||||
Use the following environment variables to customize {{% product-name %}} settings
|
### Persist data across restarts
|
||||||
in your container.
|
|
||||||
|
|
||||||
- [DATABASE_URL](#database_url)
|
{{% product-name %}} stores application data in a SQLite database. To persist this data across container restarts:
|
||||||
- [SESSION_SECRET_KEY](#session_secret_key)
|
|
||||||
- [SSL_CERT_PATH](#ssl_cert_path)
|
|
||||||
- [SSL_KEY_PATH](#ssl_key_path)
|
|
||||||
|
|
||||||
### DATABASE_URL
|
1. **Create a local directory:**
|
||||||
|
|
||||||
Path to SQLite DB inside container. The default is `/db/sqlite.db`.
|
```bash
|
||||||
|
mkdir -m 700 ./db
|
||||||
|
```
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
2. **Mount the directory when running the container:**
|
||||||
{{% expand "View `DATABASE_URL` example" %}}
|
|
||||||
<!-- pytest.mark.skip -->
|
|
||||||
|
|
||||||
```bash
|
{{< code-tabs-wrapper >}}
|
||||||
docker run --detach \
|
{{% code-tabs %}}
|
||||||
# ...
|
[Docker](#)
|
||||||
--volume $(pwd)/db:/custom/db-path:rw \
|
[Docker Compose](#)
|
||||||
--env DATABASE_URL=/custom/db-path/sqlite.db \
|
{{% /code-tabs %}}
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
|
||||||
```
|
|
||||||
{{% /expand %}}
|
|
||||||
{{< /expand-wrapper >}}
|
|
||||||
|
|
||||||
### SESSION_SECRET_KEY
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
--volume $(pwd)/db:/db:rw \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
Specifies the secret key for session management. If none is provided, Explorer
|
{{% code-tab-content %}}
|
||||||
uses a random 32-byte hex string as the session secret key.
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
services:
|
||||||
{{% expand "View `SESSION_SECRET_KEY` example" %}}
|
explorer:
|
||||||
<!-- pytest.mark.skip -->
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
```bash
|
ports:
|
||||||
docker run --detach \
|
- "8888:80"
|
||||||
# ...
|
volumes:
|
||||||
--env SESSION_SECRET_KEY=xxX0Xx000xX0XxxxX0Xx000xX0XxX00x \
|
- ./db:/db:rw
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
{{% /expand %}}
|
{{% /code-tab-content %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
> [!Important]
|
> [!Important]
|
||||||
> #### Always set SESSION_SECRET_KEY in production
|
> Without a mounted `./db` directory, application data is lost when the container is deleted.
|
||||||
|
|
||||||
|
### Pre-configure InfluxDB connections
|
||||||
|
|
||||||
|
Instead of configuring connections through the UI, you can pre-define connection settings using a `config.json` file. This is useful for:
|
||||||
|
- Automated deployments
|
||||||
|
- Shared team configurations
|
||||||
|
- Quick setup for known environments
|
||||||
|
|
||||||
|
1. **Create a `config.json` file:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p config
|
||||||
|
cat > config/config.json << 'EOF'
|
||||||
|
{
|
||||||
|
"DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181",
|
||||||
|
"DEFAULT_INFLUX_DATABASE": "mydb",
|
||||||
|
"DEFAULT_API_TOKEN": "your-token-here",
|
||||||
|
"DEFAULT_SERVER_NAME": "Local InfluxDB 3"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
Customize the following properties for your InfluxDB 3 instance:
|
||||||
|
|
||||||
|
- **`DEFAULT_INFLUX_SERVER`**: your [InfluxDB 3 Core](/influxdb3/core/reference/config-options/#http-bind) or [Enterprise](/influxdb3/enterprise/reference/config-options/#http-bind) server URL
|
||||||
|
- **`DEFAULT_INFLUX_DATABASE`**: the name of your [InfluxDB 3 Core](/influxdb3/core/admin/databases/) or [Enterprise](/influxdb3/enterprise/admin/databases/) database
|
||||||
|
- **`DEFAULT_API_TOKEN`**: your [InfluxDB 3 Core](/influxdb3/core/admin/tokens/) or [Enterprise](/influxdb3/enterprise/admin/tokens/) authorization token with the necessary permissions to access your server
|
||||||
|
- **`DEFAULT_SERVER_NAME`**: a display name (only used by Explorer) for your [InfluxDB 3 Core](/influxdb3/core/get-started/setup/#start-influxdb) or [Enterprise](/influxdb3/enterprise/get-started/setup/#start-influxdb) server
|
||||||
|
|
||||||
|
> [!Note]
|
||||||
|
> If connecting to a local, _non-Docker_ instance, use `host.docker.internal` as your server host--for example:
|
||||||
|
>
|
||||||
|
> ```txt
|
||||||
|
> "DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181"
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> `host.docker.internal` allows the Docker container to connect to services running on your host machine.
|
||||||
|
> For more information, see the [Docker documentation](https://docs.docker.com/desktop/features/networking).
|
||||||
|
|
||||||
|
2. **Mount the configuration directory:**
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
--volume $(pwd)/config:/app-root/config:ro \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
|
volumes:
|
||||||
|
- ./config:/app-root/config:ro
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
### Enable TLS/SSL (HTTPS)
|
||||||
|
|
||||||
|
To enable TLS/SSL for secure connections:
|
||||||
|
|
||||||
|
1. **Create SSL directory and add certificate files:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -m 755 ./ssl
|
||||||
|
# Copy your certificate files to the ssl directory
|
||||||
|
cp /path/to/server.crt ./ssl/
|
||||||
|
cp /path/to/server.key ./ssl/
|
||||||
|
```
|
||||||
|
|
||||||
|
Required files:
|
||||||
|
- Certificate: `server.crt` or `fullchain.pem`
|
||||||
|
- Private key: `server.key`
|
||||||
|
|
||||||
|
2. **Run the container with SSL enabled:**
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:443 \
|
||||||
|
--volume $(pwd)/ssl:/etc/nginx/ssl:ro \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
|
ports:
|
||||||
|
- "8888:443"
|
||||||
|
volumes:
|
||||||
|
- ./ssl:/etc/nginx/ssl:ro
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
3. **Access the Explorer UI at <https://localhost:8888>**
|
||||||
|
|
||||||
|
> [!Note]
|
||||||
|
> The nginx web server automatically detects and uses certificate files in the mounted path.
|
||||||
|
|
||||||
|
### Choose operational mode
|
||||||
|
|
||||||
|
{{% product-name %}} supports two operational modes:
|
||||||
|
|
||||||
|
- **Query mode** (default): Read-only UI for querying data
|
||||||
|
- **Admin mode**: Full UI with administrative capabilities
|
||||||
|
|
||||||
|
Set the mode using the `--mode` parameter:
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
# Query mode (default)
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}} \
|
||||||
|
--mode=query
|
||||||
|
|
||||||
|
# Admin mode
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--publish 8888:80 \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}} \
|
||||||
|
--mode=admin
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
|
# For query mode (default), omit the command
|
||||||
|
# For admin mode, add:
|
||||||
|
command: ["--mode=admin"]
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Advanced configuration
|
||||||
|
|
||||||
|
### Environment variables
|
||||||
|
|
||||||
|
| Variable | Default | Description |
|
||||||
|
|----------|---------|-------------|
|
||||||
|
| `SESSION_SECRET_KEY` | _(random)_ | Secret key for session management. **Set this in production to persist sessions across restarts.** |
|
||||||
|
| `DATABASE_URL` | `/db/sqlite.db` | Path to SQLite database inside container |
|
||||||
|
| `SSL_CERT_PATH` | `/etc/nginx/ssl/cert.pem` | Path to SSL certificate file |
|
||||||
|
| `SSL_KEY_PATH` | `/etc/nginx/ssl/key.pem` | Path to SSL private key file |
|
||||||
|
|
||||||
|
> [!Important]
|
||||||
|
> Always set `SESSION_SECRET_KEY` in production to persist user sessions across container restarts.
|
||||||
|
> Enter the following command to generate a secure key:
|
||||||
>
|
>
|
||||||
> When you restart the container, {{% product-name %}} generates a new key if
|
> ```bash
|
||||||
> not explicitly set. For production use cases, always set the `SESSION_SECRET_KEY`
|
> openssl rand -hex 32
|
||||||
> environment variable to persist sessions across restarts.
|
> ```
|
||||||
|
|
||||||
### SSL_CERT_PATH
|
### Volume reference
|
||||||
|
|
||||||
Defines the path to the SSL certificate file inside the container.
|
| Container Path | Purpose | Permissions | Required |
|
||||||
Default is `/etc/nginx/ssl/cert.pem`.
|
|----------------|---------|-------------|----------|
|
||||||
|
| `/db` | SQLite database storage | 700 | No (but recommended) |
|
||||||
|
| `/app-root/config` | Connection configuration | 755 | No |
|
||||||
|
| `/etc/nginx/ssl` | TLS/SSL certificates | 755 | Only for HTTPS |
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
### Port reference
|
||||||
{{% expand "View `SSL_CERT_PATH` example" %}}
|
|
||||||
<!-- pytest.mark.skip -->
|
| Container Port | Protocol | Purpose | Common Host Mapping |
|
||||||
|
|----------------|----------|---------|---------------------|
|
||||||
|
| 80 | HTTP | Web UI (unencrypted) | 8888 |
|
||||||
|
| 443 | HTTPS | Web UI (encrypted) | 8888 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Complete examples
|
||||||
|
|
||||||
|
### Production setup with all features
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
# Create required directories
|
||||||
|
mkdir -m 700 ./db
|
||||||
|
mkdir -m 755 ./config ./ssl
|
||||||
|
|
||||||
|
# Generate session secret
|
||||||
|
export SESSION_SECRET=$(openssl rand -hex 32)
|
||||||
|
|
||||||
|
# Create configuration
|
||||||
|
cat > config/config.json << 'EOF'
|
||||||
|
{
|
||||||
|
"DEFAULT_INFLUX_SERVER": "http://host.docker.internal:8181",
|
||||||
|
"DEFAULT_INFLUX_DATABASE": "production",
|
||||||
|
"DEFAULT_API_TOKEN": "your-production-token",
|
||||||
|
"DEFAULT_SERVER_NAME": "Production InfluxDB 3"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Run Explorer with all features
|
||||||
|
docker run --detach \
|
||||||
|
--name influxdb3-explorer \
|
||||||
|
--pull always \
|
||||||
|
--publish 8888:443 \
|
||||||
|
--volume $(pwd)/db:/db:rw \
|
||||||
|
--volume $(pwd)/config:/app-root/config:ro \
|
||||||
|
--volume $(pwd)/ssl:/etc/nginx/ssl:ro \
|
||||||
|
--env SESSION_SECRET_KEY=$SESSION_SECRET \
|
||||||
|
--restart unless-stopped \
|
||||||
|
influxdata/influxdb3-ui:{{% latest-patch %}} \
|
||||||
|
--mode=admin
|
||||||
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
# docker-compose.yml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
explorer:
|
||||||
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
|
container_name: influxdb3-explorer
|
||||||
|
pull_policy: always
|
||||||
|
command: ["--mode=admin"]
|
||||||
|
ports:
|
||||||
|
- "8888:443"
|
||||||
|
volumes:
|
||||||
|
- ./db:/db:rw
|
||||||
|
- ./config:/app-root/config:ro
|
||||||
|
- ./ssl:/etc/nginx/ssl:ro
|
||||||
|
environment:
|
||||||
|
SESSION_SECRET_KEY: ${SESSION_SECRET_KEY}
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a `.env` file that contains the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --detach \
|
SESSION_SECRET_KEY=your_32_char_hex_string_here
|
||||||
# ...
|
|
||||||
--volume $(pwd)/ssl:/custom/ssl:ro \
|
|
||||||
--env SSL_CERT_PATH=/custom/ssl/cert.pem \
|
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
|
||||||
```
|
```
|
||||||
{{% /expand %}}
|
|
||||||
{{< /expand-wrapper >}}
|
|
||||||
|
|
||||||
### SSL_KEY_PATH
|
Start the container:
|
||||||
|
|
||||||
Defines the path to the SSL private key file inside the container.
|
|
||||||
Default is `/etc/nginx/ssl/key.pem`.
|
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
|
||||||
{{% expand "View `SSL_KEY_PATH` example" %}}
|
|
||||||
<!-- pytest.mark.skip -->
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --detach \
|
docker-compose up -d
|
||||||
# ...
|
```
|
||||||
--volume $(pwd)/ssl:/custom/ssl:ro \
|
{{% /code-tab-content %}}
|
||||||
--env SSL_KEY_PATH=/custom/ssl/key.pem \
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
||||||
|
### Development setup (minimal)
|
||||||
|
|
||||||
|
{{< code-tabs-wrapper >}}
|
||||||
|
{{% code-tabs %}}
|
||||||
|
[Docker](#)
|
||||||
|
[Docker Compose](#)
|
||||||
|
{{% /code-tabs %}}
|
||||||
|
|
||||||
|
{{% code-tab-content %}}
|
||||||
|
```bash
|
||||||
|
docker run --rm \
|
||||||
|
--name influxdb3-explorer-dev \
|
||||||
|
--publish 8888:80 \
|
||||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
```
|
```
|
||||||
{{% /expand %}}
|
{{% /code-tab-content %}}
|
||||||
{{< /expand-wrapper >}}
|
|
||||||
|
|
||||||
## Volume Reference
|
{{% code-tab-content %}}
|
||||||
|
```yaml
|
||||||
|
# docker-compose.yml
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
| Container Path | Purpose | Host Example |
|
services:
|
||||||
|----------------------|------------------------------|----------------------------|
|
explorer:
|
||||||
| `/db` | SQLite DB storage | `./db` |
|
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||||
| `/app-root/config` | JSON config for defaults | `./config` |
|
container_name: influxdb3-explorer-dev
|
||||||
| `/etc/nginx/ssl` | SSL certs for HTTPS | `./ssl` |
|
ports:
|
||||||
|
- "8888:80"
|
||||||
## Exposed Ports
|
|
||||||
|
|
||||||
| Port | Protocol | Purpose |
|
|
||||||
|------|----------|-------------------------|
|
|
||||||
| 80 | HTTP | Web access (unencrypted) |
|
|
||||||
| 443 | HTTPS | Web access (encrypted) |
|
|
||||||
|
|
||||||
### Custom port mapping
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# Map ports to custom host values
|
|
||||||
--publish 8888:80 --publish 8443:443
|
|
||||||
```
|
```
|
||||||
|
{{% /code-tab-content %}}
|
||||||
|
{{< /code-tabs-wrapper >}}
|
||||||
|
|
|
||||||
|
|
@ -175,10 +175,6 @@ influxdb3 serve
|
||||||
- [TCP Listeners](#tcp-listeners)
|
- [TCP Listeners](#tcp-listeners)
|
||||||
- [tcp-listener-file-path](#tcp-listener-file-path)
|
- [tcp-listener-file-path](#tcp-listener-file-path)
|
||||||
- [admin-token-recovery-tcp-listener-file-path](#admin-token-recovery-tcp-listener-file-path)
|
- [admin-token-recovery-tcp-listener-file-path](#admin-token-recovery-tcp-listener-file-path)
|
||||||
{{% show-in "enterprise" %}}
|
|
||||||
- [Experimental Features](#experimental-features)
|
|
||||||
- [use-pacha-tree](#use-pacha-tree)
|
|
||||||
{{% /show-in %}}
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -939,6 +935,11 @@ Sets the filter directive for logs.
|
||||||
|
|
||||||
Specifies the destination for logs.
|
Specifies the destination for logs.
|
||||||
|
|
||||||
|
This option supports the following values:
|
||||||
|
|
||||||
|
- `stdout` _(default)_
|
||||||
|
- `stderr`
|
||||||
|
|
||||||
**Default:** `stdout`
|
**Default:** `stdout`
|
||||||
|
|
||||||
| influxdb3 serve option | Environment variable |
|
| influxdb3 serve option | Environment variable |
|
||||||
|
|
@ -1972,25 +1973,3 @@ Specifies the TCP listener file path for admin token recovery operations.
|
||||||
| influxdb3 serve option | Environment variable |
|
| influxdb3 serve option | Environment variable |
|
||||||
| :---------------------------------------------- | :-------------------------------------------------------- |
|
| :---------------------------------------------- | :-------------------------------------------------------- |
|
||||||
| `--admin-token-recovery-tcp-listener-file-path` | `INFLUXDB3_ADMIN_TOKEN_RECOVERY_TCP_LISTENER_FILE_PATH` |
|
| `--admin-token-recovery-tcp-listener-file-path` | `INFLUXDB3_ADMIN_TOKEN_RECOVERY_TCP_LISTENER_FILE_PATH` |
|
||||||
|
|
||||||
{{% show-in "enterprise" %}}
|
|
||||||
---
|
|
||||||
|
|
||||||
### Experimental Features
|
|
||||||
|
|
||||||
- [use-pacha-tree](#use-pacha-tree)
|
|
||||||
|
|
||||||
#### use-pacha-tree
|
|
||||||
|
|
||||||
Enables the experimental PachaTree storage engine for improved performance.
|
|
||||||
|
|
||||||
> [!Warning]
|
|
||||||
> This is an experimental feature and should not be used in production environments.
|
|
||||||
|
|
||||||
**Default:** `false`
|
|
||||||
|
|
||||||
| influxdb3 serve option | Environment variable |
|
|
||||||
| :---------------------- | :------------------------------------- |
|
|
||||||
| `--use-pacha-tree` | `INFLUXDB3_ENTERPRISE_USE_PACHA_TREE` |
|
|
||||||
|
|
||||||
{{% /show-in %}}
|
|
||||||
|
|
@ -77,7 +77,7 @@ aggregate value.
|
||||||
Returns an array created from the expression elements.
|
Returns an array created from the expression elements.
|
||||||
|
|
||||||
> [!Note]
|
> [!Note]
|
||||||
> `array_agg` returns a `LIST` arrow type. Use bracket notation to reference the
|
> `array_agg` returns a `LIST` Arrow type. Use bracket notation to reference the
|
||||||
> index of an element in the returned array. Arrays are 1-indexed.
|
> index of an element in the returned array. Arrays are 1-indexed.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
|
@ -524,7 +524,7 @@ GROUP BY location
|
||||||
|
|
||||||
### mean
|
### mean
|
||||||
|
|
||||||
_Alias of [avg](#avg)._
|
_Alias of [`avg`](#avg)._
|
||||||
|
|
||||||
### median
|
### median
|
||||||
|
|
||||||
|
|
@ -1403,7 +1403,7 @@ GROUP BY room
|
||||||
|
|
||||||
### var_population
|
### var_population
|
||||||
|
|
||||||
_Alias of [var_pop](#var_pop)._
|
_Alias of [`var_pop`](#var_pop)._
|
||||||
|
|
||||||
### var_samp
|
### var_samp
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,7 +13,7 @@ Decode binary data from textual representation in string.
|
||||||
decode(expression, format)
|
decode(expression, format)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression containing encoded string data.
|
- **expression**: Expression containing encoded string data.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -33,7 +33,7 @@ Encode binary data into a textual representation.
|
||||||
encode(expression, format)
|
encode(expression, format)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression containing string or binary data.
|
- **expression**: Expression containing string or binary data.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@ Returns data from an {{< product-name >}} distinct value cache.
|
||||||
distinct_cache(table_name, cache_name)
|
distinct_cache(table_name, cache_name)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **table_name**: Name of the table associated with the distinct value cache
|
- **table_name**: Name of the table associated with the distinct value cache
|
||||||
_(formatted as a string literal)_.
|
_(formatted as a string literal)_.
|
||||||
- **datatype**: Name of the the distinct value cache to query
|
- **cache_name**: Name of the distinct value cache to query
|
||||||
_(formatted as a string literal)_.
|
_(formatted as a string literal)_.
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
{{< expand-wrapper >}}
|
||||||
|
|
@ -38,11 +38,11 @@ Returns data from an {{< product-name >}} last value cache.
|
||||||
last_cache(table_name, cache_name)
|
last_cache(table_name, cache_name)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **table_name**: Name of the table associated with the last value cache
|
- **table_name**: Name of the table associated with the last value cache
|
||||||
_(formatted as a string literal)_.
|
_(formatted as a string literal)_.
|
||||||
- **datatype**: Name of the the last value cache to query
|
- **cache_name**: Name of the last value cache to query
|
||||||
_(formatted as a string literal)_.
|
_(formatted as a string literal)_.
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
{{< expand-wrapper >}}
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,13 @@ The {{< product-name >}} SQL implementation supports the following conditional
|
||||||
functions for conditionally handling _null_ values:
|
functions for conditionally handling _null_ values:
|
||||||
|
|
||||||
- [coalesce](#coalesce)
|
- [coalesce](#coalesce)
|
||||||
|
- [greatest](#greatest)
|
||||||
- [ifnull](#ifnull)
|
- [ifnull](#ifnull)
|
||||||
|
- [least](#least)
|
||||||
- [nullif](#nullif)
|
- [nullif](#nullif)
|
||||||
- [nvl](#nvl)
|
- [nvl](#nvl)
|
||||||
- [nvl2](#nvl2)
|
- [nvl2](#nvl2)
|
||||||
|
|
||||||
<!-- Will come with next DataFusion upgrade
|
|
||||||
- [greatest](#greatest)
|
|
||||||
- [least](#least)
|
|
||||||
-->
|
|
||||||
|
|
||||||
## coalesce
|
## coalesce
|
||||||
|
|
||||||
Returns the first of its arguments that is not _null_.
|
Returns the first of its arguments that is not _null_.
|
||||||
|
|
@ -56,7 +53,7 @@ FROM
|
||||||
{{% /expand %}}
|
{{% /expand %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
<!--
|
|
||||||
## greatest
|
## greatest
|
||||||
|
|
||||||
Returns the greatest value in a list of expressions.
|
Returns the greatest value in a list of expressions.
|
||||||
|
|
@ -79,25 +76,23 @@ _The following example uses the
|
||||||
[Random numbers sample dataset](/influxdb/version/reference/sample-data/#random-numbers-sample-data)._
|
[Random numbers sample dataset](/influxdb/version/reference/sample-data/#random-numbers-sample-data)._
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT greatest(a, b) AS greatest FROM numbers LIMIT 4
|
SELECT time, greatest(a, b) AS greatest FROM numbers LIMIT 4
|
||||||
```
|
```
|
||||||
|
|
||||||
| time | greatest |
|
| time | greatest |
|
||||||
| ------------------- | ------------------: |
|
| :------------------ | -----------------: |
|
||||||
| 2023-01-01T00:02:00 | -0.482943221384294 |
|
| 2023-01-01T01:20:00 | -0.515490223280789 |
|
||||||
| 2023-01-01T00:03:00 | -0.0729732928756677 |
|
| 2023-01-01T01:21:00 | 0.803201312042983 |
|
||||||
| 2023-01-01T00:04:00 | 1.77857552719844 |
|
| 2023-01-01T01:22:00 | 0.970938142399892 |
|
||||||
| 2023-01-01T00:05:00 | 0.741147445214238 |
|
| 2023-01-01T01:23:00 | 0.0493748366311344 |
|
||||||
|
|
||||||
{{% /expand %}}
|
{{% /expand %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /expand-wrapper >}}
|
||||||
-->
|
|
||||||
|
|
||||||
## ifnull
|
## ifnull
|
||||||
|
|
||||||
_Alias of [nvl](#nvl)._
|
_Alias of [nvl](#nvl)._
|
||||||
|
|
||||||
<!--
|
|
||||||
## least
|
## least
|
||||||
|
|
||||||
Returns the least value in a list of expressions.
|
Returns the least value in a list of expressions.
|
||||||
|
|
@ -120,19 +115,18 @@ _The following example uses the
|
||||||
[Random numbers sample dataset](/influxdb/version/reference/sample-data/#random-numbers-sample-data)._
|
[Random numbers sample dataset](/influxdb/version/reference/sample-data/#random-numbers-sample-data)._
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT least(a, b) AS least FROM numbers LIMIT 4
|
SELECT time, least(a, b) AS least FROM numbers LIMIT 4
|
||||||
```
|
```
|
||||||
|
|
||||||
| time | least |
|
| time | least |
|
||||||
| ------------------- | -----------------: |
|
| :------------------ | -----------------: |
|
||||||
| 2023-01-01T00:02:00 | -0.921037167720451 |
|
| 2023-01-01T00:10:00 | -1.08759833527982 |
|
||||||
| 2023-01-01T00:03:00 | -0.73880754843378 |
|
| 2023-01-01T00:11:00 | -0.187620086586211 |
|
||||||
| 2023-01-01T00:04:00 | -0.905980032168252 |
|
| 2023-01-01T00:12:00 | -0.81371037157091 |
|
||||||
| 2023-01-01T00:05:00 | -0.891164752631417 |
|
| 2023-01-01T00:13:00 | -0.339781659874945 |
|
||||||
|
|
||||||
{{% /expand %}}
|
{{% /expand %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /expand-wrapper >}}
|
||||||
-->
|
|
||||||
|
|
||||||
## nullif
|
## nullif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Computes the binary hash of an expression using the specified algorithm.
|
||||||
digest(expression, algorithm)
|
digest(expression, algorithm)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -63,7 +63,7 @@ Computes an MD5 128-bit checksum for a string expression.
|
||||||
md5(expression)
|
md5(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -98,7 +98,7 @@ Computes the SHA-224 hash of a binary string.
|
||||||
sha224(expression)
|
sha224(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -133,7 +133,7 @@ Computes the SHA-256 hash of a binary string.
|
||||||
sha256(expression)
|
sha256(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -168,7 +168,7 @@ Computes the SHA-384 hash of a binary string.
|
||||||
sha384(expression)
|
sha384(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -203,7 +203,7 @@ Computes the SHA-512 hash of a binary string.
|
||||||
sha512(expression)
|
sha512(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: String expression to operate on.
|
- **expression**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,272 @@
|
||||||
|
|
||||||
|
Use map functions to create and operate on Arrow maps in SQL queries.
|
||||||
|
|
||||||
|
- [element_at](#element_at)
|
||||||
|
- [make_map](#make_map)
|
||||||
|
- [map](#map)
|
||||||
|
- [map_extract](#map_extract)
|
||||||
|
- [map_keys](#map_keys)
|
||||||
|
- [map_values](#map_values)
|
||||||
|
<!-- - [map_entries](#map_entries) -->
|
||||||
|
|
||||||
|
## element_at
|
||||||
|
|
||||||
|
_Alias of [map_extract](#map_extract)._
|
||||||
|
|
||||||
|
## make_map
|
||||||
|
|
||||||
|
Returns an Arrow map with the specified key and value.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
make_map(key, value)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **key**: Expression to use for the key.
|
||||||
|
Can be a constant, column, function, or any combination of arithmetic or
|
||||||
|
string operators.
|
||||||
|
- **value**: Expression to use for the value.
|
||||||
|
Can be a constant, column, function, or any combination of arithmetic or
|
||||||
|
string operators.
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `make_map` query example" %}}
|
||||||
|
|
||||||
|
_The following example uses the
|
||||||
|
{{% influxdb3/home-sample-link %}}._
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
make_map(room, temp) AS make_map
|
||||||
|
FROM
|
||||||
|
home
|
||||||
|
LIMIT 4
|
||||||
|
```
|
||||||
|
|
||||||
|
| make_map |
|
||||||
|
| :------------------ |
|
||||||
|
| {Kitchen: 22.4} |
|
||||||
|
| {Living Room: 22.2} |
|
||||||
|
| {Kitchen: 22.7} |
|
||||||
|
| {Living Room: 22.2} |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
## map
|
||||||
|
|
||||||
|
Returns an Arrow map with the specified key-value pairs.
|
||||||
|
Keys are mapped to values by their positions in each respective list.
|
||||||
|
Each _key_ must be unique and non-null.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
map(key_list, value_list)
|
||||||
|
-- or
|
||||||
|
map { key: value, ... }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **key_list**: List of keys to use in the map.
|
||||||
|
Each key must be unique and non-null.
|
||||||
|
- **value_list**: List of values to map to the corresponding keys.
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `map` query example" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
map(
|
||||||
|
[400, 401, 402, 403, 404],
|
||||||
|
['Bad Request', 'Unauthorized', 'Payment Required', 'Forbidden', 'Not Found']
|
||||||
|
) AS map
|
||||||
|
```
|
||||||
|
|
||||||
|
| map |
|
||||||
|
| :------------------------------------------------------------------------------------------- |
|
||||||
|
| {400: Bad Request, 401: Unauthorized, 402: Payment Required, 403: Forbidden, 404: Not Found} |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{% expand "View `map` query example with alternate syntax" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
map {
|
||||||
|
400: 'Bad Request',
|
||||||
|
401: 'Unauthorized',
|
||||||
|
402: 'Payment Required',
|
||||||
|
403: 'Forbidden',
|
||||||
|
404: 'Not Found'
|
||||||
|
} AS map
|
||||||
|
```
|
||||||
|
|
||||||
|
| map |
|
||||||
|
| :------------------------------------------------------------------------------------------- |
|
||||||
|
| {400: Bad Request, 401: Unauthorized, 402: Payment Required, 403: Forbidden, 404: Not Found} |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ## map_entries
|
||||||
|
|
||||||
|
Returns a list of all entries in a map.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
map_entries(map)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **map**: Map expression. Can be a constant, column, or function, and any
|
||||||
|
combination of map operators.
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `map` query example" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
map_entries(
|
||||||
|
map(
|
||||||
|
[400, 401, 404],
|
||||||
|
['Bad Request', 'Unauthorized', 'Not Found']
|
||||||
|
)
|
||||||
|
) AS map_entries
|
||||||
|
```
|
||||||
|
| map_entries |
|
||||||
|
| :---------------------------------------------------------------------------------------------------------- |
|
||||||
|
| [{'key': 400, 'value': Bad Request}, {'key': 401, 'value': Unauthorized}, {'key': 404, 'value': Not Found}] |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}} -->
|
||||||
|
|
||||||
|
## map_extract
|
||||||
|
|
||||||
|
Returns a list containing the value for the given key or an empty list if the
|
||||||
|
Returns a list containing the value for the given key, or an empty list if the
|
||||||
|
key is not present in the map. The returned list will contain exactly one element
|
||||||
|
(the value) when the key is found.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
map_extract(map, key)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **map**: Map expression. Can be a constant, column, or function, and any
|
||||||
|
combination of map operators.
|
||||||
|
- **key**: Key to extract from the map. Can be a constant, column, or function,
|
||||||
|
any combination of arithmetic or string operators, or a named expression of
|
||||||
|
the previously listed.
|
||||||
|
|
||||||
|
#### Aliases
|
||||||
|
|
||||||
|
- `element_at`
|
||||||
|
|
||||||
|
##### Related functions
|
||||||
|
|
||||||
|
[get_field](/influxdb3/version/reference/sql/functions/misc/#get_field)
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `map_extract` query example" %}}
|
||||||
|
|
||||||
|
The following example uses the
|
||||||
|
[NOAA Bay Area weather sample data](/influxdb3/version/reference/sample-data/#noaa-bay-area-weather-data)
|
||||||
|
to perform the a query that:
|
||||||
|
|
||||||
|
- Defines a set of constants that includes a map that assigns integers to days
|
||||||
|
of the week.
|
||||||
|
- Queries the weather sample data and use `date_part` to extract an integer
|
||||||
|
representing the day of the week of the row's `time` value.
|
||||||
|
- Uses `map_extract` and the output of `date_part` to return an array containing
|
||||||
|
the name of the day of the week.
|
||||||
|
- Uses bracket notation (`[i]`) to reference an element by index in the returned
|
||||||
|
list (SQL arrays are 1-indexed, so `[1]` retrieves the first element).
|
||||||
|
|
||||||
|
```sql
|
||||||
|
WITH constants AS (
|
||||||
|
SELECT map(
|
||||||
|
[0, 1, 2, 3, 4, 5, 6],
|
||||||
|
['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
||||||
|
) AS days_of_week
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
weather.time,
|
||||||
|
map_extract(c.days_of_week, date_part('dow', time))[1] AS day_of_week
|
||||||
|
FROM
|
||||||
|
weather,
|
||||||
|
constants AS c
|
||||||
|
ORDER BY
|
||||||
|
weather.time
|
||||||
|
LIMIT 6
|
||||||
|
```
|
||||||
|
|
||||||
|
| time | day_of_week |
|
||||||
|
| :------------------ | :---------- |
|
||||||
|
| 2020-01-01T00:00:00 | Wednesday |
|
||||||
|
| 2020-01-01T00:00:00 | Wednesday |
|
||||||
|
| 2020-01-01T00:00:00 | Wednesday |
|
||||||
|
| 2020-01-02T00:00:00 | Thursday |
|
||||||
|
| 2020-01-02T00:00:00 | Thursday |
|
||||||
|
| 2020-01-02T00:00:00 | Thursday |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
## map_keys
|
||||||
|
|
||||||
|
Returns a list of all keys in the map.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
map_keys(map)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **map**: Map expression. Can be a constant, column, or function, and any
|
||||||
|
combination of map operators.
|
||||||
|
|
||||||
|
##### Related functions
|
||||||
|
|
||||||
|
[get_field](/influxdb3/version/reference/sql/functions/misc/#get_field)
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `map_keys` query example" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT map_keys(map {'a': 1, 'b': NULL, 'c': 3}) AS map_keys
|
||||||
|
```
|
||||||
|
|
||||||
|
| map_keys |
|
||||||
|
| :-------- |
|
||||||
|
| [a, b, c] |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
## map_values
|
||||||
|
|
||||||
|
Returns a list of all values in the map.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
map_values(map)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **map**: Map expression. Can be a constant, column, or function, and any combination of map operators.
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `map_values` query example" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT map_values(map {'a': 1, 'b': NULL, 'c': 3}) AS map_values
|
||||||
|
```
|
||||||
|
|
||||||
|
| map_values |
|
||||||
|
| :--------- |
|
||||||
|
| [1, , 3] |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
@ -49,7 +49,7 @@ Returns the absolute value of a number.
|
||||||
abs(numeric_expression)
|
abs(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -80,7 +80,7 @@ Returns the arc cosine or inverse cosine of a number.
|
||||||
acos(numeric_expression)
|
acos(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -111,7 +111,7 @@ Returns the area hyperbolic cosine or inverse hyperbolic cosine of a number.
|
||||||
acosh(numeric_expression)
|
acosh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -142,7 +142,7 @@ Returns the arc sine or inverse sine of a number.
|
||||||
asin(numeric_expression)
|
asin(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -173,7 +173,7 @@ Returns the area hyperbolic sine or inverse hyperbolic sine of a number.
|
||||||
asinh(numeric_expression)
|
asinh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -204,7 +204,7 @@ Returns the arc tangent or inverse tangent of a number.
|
||||||
atan(numeric_expression)
|
atan(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -235,7 +235,7 @@ Returns the area hyperbolic tangent or inverse hyperbolic tangent of a number.
|
||||||
atanh(numeric_expression)
|
atanh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -266,7 +266,7 @@ Returns the arc tangent or inverse tangent of `expression_y / expression_x`.
|
||||||
atan2(expression_y, expression_x)
|
atan2(expression_y, expression_x)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression_y**: First numeric expression to operate on.
|
- **expression_y**: First numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -299,7 +299,7 @@ Returns the cube root of a number.
|
||||||
cbrt(numeric_expression)
|
cbrt(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -330,7 +330,7 @@ Returns the nearest integer greater than or equal to a number.
|
||||||
ceil(numeric_expression)
|
ceil(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -361,7 +361,7 @@ Returns the cosine of a number.
|
||||||
cos(numeric_expression)
|
cos(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -392,7 +392,7 @@ Returns the hyperbolic cosine of a number.
|
||||||
cosh(numeric_expression)
|
cosh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -423,7 +423,7 @@ Returns the cotangent of a number.
|
||||||
cot(numeric_expression)
|
cot(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -455,7 +455,7 @@ Converts radians to degrees.
|
||||||
degrees(numeric_expression)
|
degrees(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -487,7 +487,7 @@ Returns the base-e exponential of a number.
|
||||||
exp(numeric_expression)
|
exp(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to use as the exponent.
|
- **numeric_expression**: Numeric expression to use as the exponent.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -518,7 +518,7 @@ Returns 1 if value is less than 2.
|
||||||
factorial(numeric_expression)
|
factorial(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Must be an integer (`BIGINT`).
|
Must be an integer (`BIGINT`).
|
||||||
|
|
@ -551,7 +551,7 @@ Returns the nearest integer less than or equal to a number.
|
||||||
floor(numeric_expression)
|
floor(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -583,7 +583,7 @@ Returns `0` if both inputs are zero.
|
||||||
gcd(expression_x, expression_y)
|
gcd(expression_x, expression_y)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression_x**: First numeric expression to operate on.
|
- **expression_x**: First numeric expression to operate on.
|
||||||
Must be an integer (`BIGINT`).
|
Must be an integer (`BIGINT`).
|
||||||
|
|
@ -619,7 +619,7 @@ Returns `true` if a given number is ±NaN, otherwise returns `false`.
|
||||||
isnan(numeric_expression)
|
isnan(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Must be a float (`DOUBLE`).
|
Must be a float (`DOUBLE`).
|
||||||
|
|
@ -658,7 +658,7 @@ Returns `true` if the given number is ±0.0, otherwise returns `false`.
|
||||||
iszero(numeric_expression)
|
iszero(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -697,7 +697,7 @@ Returns `0` if either input is zero.
|
||||||
lcm(expression_x, expression_y)
|
lcm(expression_x, expression_y)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression_x**: First numeric expression to operate on.
|
- **expression_x**: First numeric expression to operate on.
|
||||||
Must be an integer (`BIGINT`).
|
Must be an integer (`BIGINT`).
|
||||||
|
|
@ -733,7 +733,7 @@ Returns the natural logarithm of a number.
|
||||||
ln(numeric_expression)
|
ln(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -805,7 +805,7 @@ Returns the base-10 logarithm of a number.
|
||||||
log10(numeric_expression)
|
log10(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -836,7 +836,7 @@ Returns the base-2 logarithm of a number.
|
||||||
log2(numeric_expression)
|
log2(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -868,7 +868,7 @@ Otherwise returns the second argument.
|
||||||
nanvl(expression_x, expression_y)
|
nanvl(expression_x, expression_y)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression_x**: Numeric expression to return if it’s not `NaN`.
|
- **expression_x**: Numeric expression to return if it’s not `NaN`.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -934,7 +934,7 @@ power(base, exponent)
|
||||||
|
|
||||||
- `pow`
|
- `pow`
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **base**: Numeric expression to operate on.
|
- **base**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -971,7 +971,7 @@ Converts degrees to radians.
|
||||||
radians(numeric_expression)
|
radians(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1033,7 +1033,7 @@ Rounds a number to the nearest integer.
|
||||||
round(numeric_expression)
|
round(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1066,7 +1066,7 @@ Zero and positive numbers return `1`.
|
||||||
signum(numeric_expression)
|
signum(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1097,7 +1097,7 @@ Returns the sine of a number.
|
||||||
sin(numeric_expression)
|
sin(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1128,7 +1128,7 @@ Returns the hyperbolic sine of a number.
|
||||||
sinh(numeric_expression)
|
sinh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1159,7 +1159,7 @@ Returns the square root of a number.
|
||||||
sqrt(numeric_expression)
|
sqrt(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1190,7 +1190,7 @@ Returns the tangent of a number.
|
||||||
tan(numeric_expression)
|
tan(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1221,7 +1221,7 @@ Returns the hyperbolic tangent of a number.
|
||||||
tanh(numeric_expression)
|
tanh(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1253,7 +1253,7 @@ Truncates a number toward zero (at the decimal point).
|
||||||
trunc(numeric_expression)
|
trunc(numeric_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **numeric_expression**: Numeric expression to operate on.
|
- **numeric_expression**: Numeric expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ for performing a variety of operations:
|
||||||
|
|
||||||
- [arrow_cast](#arrow_cast)
|
- [arrow_cast](#arrow_cast)
|
||||||
- [arrow_typeof](#arrow_typeof)
|
- [arrow_typeof](#arrow_typeof)
|
||||||
|
- [get_field](#get_field)
|
||||||
- [interpolate](#interpolate)
|
- [interpolate](#interpolate)
|
||||||
- [locf](#locf)
|
- [locf](#locf)
|
||||||
- [version](#version)
|
- [version](#version)
|
||||||
<!-- - [struct](#struct) -->
|
|
||||||
|
|
||||||
## arrow_cast
|
## arrow_cast
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ Casts a value to a specific Arrow data type.
|
||||||
arrow_cast(expression, datatype)
|
arrow_cast(expression, datatype)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to cast.
|
- **expression**: Expression to cast.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
|
@ -55,7 +55,7 @@ of the expression:
|
||||||
arrow_typeof(expression)
|
arrow_typeof(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to evaluate.
|
- **expression**: Expression to evaluate.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
|
@ -84,6 +84,66 @@ LIMIT 1
|
||||||
{{% /expand %}}
|
{{% /expand %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
## get_field
|
||||||
|
|
||||||
|
Returns a field from a map or a struct with the specified key.
|
||||||
|
|
||||||
|
> [!Note]
|
||||||
|
> Typically, `get_field` is indirectly invoked via field access syntax such as
|
||||||
|
> `my_struct['field_name']` which results in the call:
|
||||||
|
> `get_field(my_struct, 'field_name')`.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
get_field(collection, field)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **collection**: The map or struct to retrieve a field from.
|
||||||
|
- **field**: The name of field the field to retrieve from the map or struct.
|
||||||
|
Must evaluate to a string.
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `get_field` example with a struct column" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
get_field(influxdb_struct, 'version') AS influxdb_version
|
||||||
|
FROM
|
||||||
|
(VALUES (struct('influxdb' AS product, 'v1' AS version)),
|
||||||
|
(struct('influxdb' AS product, 'v2' AS version)),
|
||||||
|
(struct('influxdb' AS product, 'v3' AS version))
|
||||||
|
) AS data(influxdb_struct)
|
||||||
|
```
|
||||||
|
|
||||||
|
| influxdb_version |
|
||||||
|
| :--------------- |
|
||||||
|
| v1 |
|
||||||
|
| v2 |
|
||||||
|
| v3 |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{% expand "View `get_field` example with a map column" %}}
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
get_field(influxdb_map, 'version') AS influxdb_version
|
||||||
|
FROM
|
||||||
|
(VALUES (map {'product': 'influxdb', 'version': 'v1'}),
|
||||||
|
(map {'product': 'influxdb', 'version': 'v2'}),
|
||||||
|
(map {'product': 'influxdb', 'version': 'v3'})
|
||||||
|
) AS data(influxdb_map)
|
||||||
|
```
|
||||||
|
|
||||||
|
| influxdb_version |
|
||||||
|
| :--------------- |
|
||||||
|
| v1 |
|
||||||
|
| v2 |
|
||||||
|
| v3 |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
## interpolate
|
## interpolate
|
||||||
|
|
||||||
Fills null values in a specified aggregated column by interpolating values
|
Fills null values in a specified aggregated column by interpolating values
|
||||||
|
|
@ -94,7 +154,7 @@ Must be used with [`date_bin_gapfill`](/influxdb/version/reference/sql/functions
|
||||||
interpolate(aggregate_expression)
|
interpolate(aggregate_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **aggregate_expression**: Aggregate operation on a specified expression.
|
- **aggregate_expression**: Aggregate operation on a specified expression.
|
||||||
The operation can use any [aggregate function](/influxdb/version/reference/sql/functions/aggregate/).
|
The operation can use any [aggregate function](/influxdb/version/reference/sql/functions/aggregate/).
|
||||||
|
|
@ -156,7 +216,7 @@ _LOCF is an initialism of "last observation carried forward."_
|
||||||
locf(aggregate_expression)
|
locf(aggregate_expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **aggregate_expression**: Aggregate operation on a specified expression.
|
- **aggregate_expression**: Aggregate operation on a specified expression.
|
||||||
The operation can use any [aggregate function](/influxdb/version/reference/sql/functions/aggregate/).
|
The operation can use any [aggregate function](/influxdb/version/reference/sql/functions/aggregate/).
|
||||||
|
|
@ -206,34 +266,6 @@ GROUP BY _time, room
|
||||||
{{% /expand %}}
|
{{% /expand %}}
|
||||||
{{< /expand-wrapper >}}
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
<!--
|
|
||||||
## struct
|
|
||||||
|
|
||||||
Returns an Arrow struct using the specified input expressions.
|
|
||||||
Fields in the returned struct use the `cN` naming convention.
|
|
||||||
For example: `c0`, `c1`, `c2`, etc.
|
|
||||||
|
|
||||||
```sql
|
|
||||||
struct(expression1[, ..., expression_n])
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Arguments
|
|
||||||
|
|
||||||
- **expression_n**: Expression to include in the output struct.
|
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
|
||||||
string operators.
|
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
|
||||||
{{% expand "View `struct` example" %}}
|
|
||||||
|
|
||||||
```sql
|
|
||||||
struct('A', 'B', 3, 4)
|
|
||||||
-- Returns {c0: A, c1: B, c3: 3, c4: 4}
|
|
||||||
```
|
|
||||||
{{% /expand %}}
|
|
||||||
{{< /expand-wrapper >}}
|
|
||||||
-->
|
|
||||||
|
|
||||||
## version
|
## version
|
||||||
|
|
||||||
Returns the version of DataFusion.
|
Returns the version of DataFusion.
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Returns the number of matches that a regular expression has in a string.
|
||||||
regexp_count(str, regexp[, start, flags])
|
regexp_count(str, regexp[, start, flags])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -62,7 +62,7 @@ false otherwise.
|
||||||
regexp_like(str, regexp[, flags])
|
regexp_like(str, regexp[, flags])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -104,7 +104,7 @@ Returns a list of regular expression matches in a string.
|
||||||
regexp_match(str, regexp, flags)
|
regexp_match(str, regexp, flags)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -147,7 +147,7 @@ Replaces substrings in a string that match a regular expression.
|
||||||
regexp_replace(str, regexp, replacement, flags)
|
regexp_replace(str, regexp, replacement, flags)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ Returns the smallest value of a selected column and a timestamp.
|
||||||
selector_min(expression, timestamp)
|
selector_min(expression, timestamp)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string or
|
Can be a constant, column, or function, and any combination of string or
|
||||||
|
|
@ -103,7 +103,7 @@ Returns the largest value of a selected column and a timestamp.
|
||||||
selector_max(expression, timestamp)
|
selector_max(expression, timestamp)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string or
|
Can be a constant, column, or function, and any combination of string or
|
||||||
|
|
@ -145,7 +145,7 @@ Returns the first value ordered by time ascending.
|
||||||
selector_first(expression, timestamp)
|
selector_first(expression, timestamp)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string or
|
Can be a constant, column, or function, and any combination of string or
|
||||||
|
|
@ -187,7 +187,7 @@ Returns the last value ordered by time ascending.
|
||||||
selector_last(expression, timestamp)
|
selector_last(expression, timestamp)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string or
|
Can be a constant, column, or function, and any combination of string or
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ Returns the ASCII value of the first character in a string.
|
||||||
ascii(str)
|
ascii(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -95,7 +95,7 @@ Returns the bit length of a string.
|
||||||
bit_length(str)
|
bit_length(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -134,7 +134,7 @@ of the input string.
|
||||||
btrim(str[, trim_str])
|
btrim(str[, trim_str])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -225,7 +225,7 @@ Concatenates multiple strings together.
|
||||||
concat(str[, ..., str_n])
|
concat(str[, ..., str_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to concatenate.
|
- **str**: String expression to concatenate.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -233,7 +233,7 @@ concat(str[, ..., str_n])
|
||||||
|
|
||||||
##### Related functions
|
##### Related functions
|
||||||
|
|
||||||
[contcat_ws](#contcat_ws)
|
[concat_ws](#concat_ws)
|
||||||
|
|
||||||
{{< expand-wrapper >}}
|
{{< expand-wrapper >}}
|
||||||
{{% expand "View `concat` query example" %}}
|
{{% expand "View `concat` query example" %}}
|
||||||
|
|
@ -268,7 +268,7 @@ Concatenates multiple strings together with a specified separator.
|
||||||
concat_ws(separator, str[, ..., str_n])
|
concat_ws(separator, str[, ..., str_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **separator**: Separator to insert between concatenated strings.
|
- **separator**: Separator to insert between concatenated strings.
|
||||||
- **str**: String expression to concatenate.
|
- **str**: String expression to concatenate.
|
||||||
|
|
@ -313,7 +313,7 @@ Returns true if a string contains a search string (case-sensitive).
|
||||||
contains(str, search_str)
|
contains(str, search_str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of operators.
|
Can be a constant, column, or function, and any combination of operators.
|
||||||
|
|
@ -327,7 +327,7 @@ Tests if a string ends with a substring.
|
||||||
ends_with(str, substr)
|
ends_with(str, substr)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to test.
|
- **str**: String expression to test.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -365,7 +365,7 @@ Returns 0 if the string is not in the list of substrings.
|
||||||
find_in_set(str, strlist)
|
find_in_set(str, strlist)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to find in `strlist`.
|
- **str**: String expression to find in `strlist`.
|
||||||
- **strlist**: A string containing a comma-delimited list of substrings.
|
- **strlist**: A string containing a comma-delimited list of substrings.
|
||||||
|
|
@ -402,7 +402,7 @@ Words are delimited by non-alphanumeric characters.
|
||||||
initcap(str)
|
initcap(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -444,7 +444,7 @@ If the substring is not in the string, the function returns 0.
|
||||||
instr(str, substr)
|
instr(str, substr)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -484,7 +484,7 @@ Returns a specified number of characters from the left side of a string.
|
||||||
left(str, n)
|
left(str, n)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -526,7 +526,7 @@ Returns the number of characters in a string.
|
||||||
length(str)
|
length(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -570,7 +570,7 @@ between two strings.
|
||||||
levenshtein(str1, str2)
|
levenshtein(str1, str2)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
- **str1**: First string expression to operate on.
|
- **str1**: First string expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
- **str2**: Second string expression to operate on.
|
- **str2**: Second string expression to operate on.
|
||||||
|
|
@ -608,7 +608,7 @@ Converts a string to lower-case.
|
||||||
lower(str)
|
lower(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -646,7 +646,7 @@ Pads the left side of a string with another string to a specified string length.
|
||||||
lpad(str, n[, padding_str])
|
lpad(str, n[, padding_str])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -687,7 +687,7 @@ Removes leading spaces from a string.
|
||||||
ltrim(str)
|
ltrim(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -733,7 +733,7 @@ Returns the length of a string in bytes.
|
||||||
octet_length(str)
|
octet_length(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -772,7 +772,7 @@ position and number of characters to replace.
|
||||||
overlay(str PLACING substr FROM pos [FOR count])
|
overlay(str PLACING substr FROM pos [FOR count])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -814,7 +814,7 @@ Returns the position of a substring in a string.
|
||||||
position(substr IN str)
|
position(substr IN str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **substr**: Substring expression to search for.
|
- **substr**: Substring expression to search for.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -852,7 +852,7 @@ Returns a string with an input string repeated a specified number of times.
|
||||||
repeat(str, n)
|
repeat(str, n)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to repeat.
|
- **str**: String expression to repeat.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -889,7 +889,7 @@ Replaces all occurrences of a specified substring in a string with a new substri
|
||||||
replace(str, substr, replacement)
|
replace(str, substr, replacement)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to repeat.
|
- **str**: String expression to repeat.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -926,7 +926,7 @@ Reverses the character order of a string.
|
||||||
reverse(str)
|
reverse(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to repeat.
|
- **str**: String expression to repeat.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -959,7 +959,7 @@ Returns a specified number of characters from the right side of a string.
|
||||||
right(str, n)
|
right(str, n)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -997,7 +997,7 @@ Pads the right side of a string with another string to a specified string length
|
||||||
rpad(str, n[, padding_str])
|
rpad(str, n[, padding_str])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1038,7 +1038,7 @@ Removes trailing spaces from a string.
|
||||||
rtrim(str)
|
rtrim(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1081,7 +1081,7 @@ specified position.
|
||||||
split_part(str, delimiter, pos)
|
split_part(str, delimiter, pos)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to spit.
|
- **str**: String expression to spit.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1119,7 +1119,7 @@ Tests if a string starts with a substring.
|
||||||
starts_with(str, substr)
|
starts_with(str, substr)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to test.
|
- **str**: String expression to test.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1159,7 +1159,7 @@ If the substring does not exist in the string, the function returns 0.
|
||||||
strpos(str, substr)
|
strpos(str, substr)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1195,7 +1195,7 @@ starting position in a string.
|
||||||
substr(str, start_pos[, length])
|
substr(str, start_pos[, length])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1237,7 +1237,7 @@ final delimiter (counting from the right).
|
||||||
substr_index(str, delimiter, count)
|
substr_index(str, delimiter, count)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1321,7 +1321,7 @@ Converts an integer to a hexadecimal string.
|
||||||
to_hex(int)
|
to_hex(int)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **int**: Integer expression to convert.
|
- **int**: Integer expression to convert.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1357,7 +1357,7 @@ Removes leading and trailing spaces from a string.
|
||||||
trim(str)
|
trim(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
@ -1399,7 +1399,7 @@ Converts a string to upper-case.
|
||||||
upper(str)
|
upper(str)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **str**: String expression to operate on.
|
- **str**: String expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of string operators.
|
Can be a constant, column, or function, and any combination of string operators.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
|
||||||
|
Use struct functions to create Arrow structs in SQL queries.
|
||||||
|
|
||||||
|
- [named_struct](#named_struct)
|
||||||
|
- [row](#row)
|
||||||
|
- [struct](#struct)
|
||||||
|
|
||||||
|
## named_struct
|
||||||
|
|
||||||
|
Returns an _Arrow struct_ using the specified name and input expressions pairs.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
named_struct(expression1_name, expression1_input[, ..., expression_n_name, expression_n_input])
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **expression_n_name**: Name of the column field. Must be a constant string.
|
||||||
|
- **expression_n_input**: Expression to include in the output struct.
|
||||||
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
string operators.
|
||||||
|
|
||||||
|
##### Related functions
|
||||||
|
|
||||||
|
[get_field](/influxdb3/version/reference/sql/functions/misc/#get_field)
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `named_struct` query example" %}}
|
||||||
|
|
||||||
|
_The following example uses the
|
||||||
|
{{% influxdb3/home-sample-link %}}._
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
named_struct('time', time, 'temperature', temp, 'humidity', hum) AS named_struct
|
||||||
|
FROM
|
||||||
|
home
|
||||||
|
WHERE
|
||||||
|
room = 'Kitchen'
|
||||||
|
LIMIT 4
|
||||||
|
```
|
||||||
|
|
||||||
|
| named_struct |
|
||||||
|
| :------------------------------------------------------------- |
|
||||||
|
| {time: 2022-01-01T13:00:00, temperature: 22.8, humidity: 36.5} |
|
||||||
|
| {time: 2022-01-01T12:00:00, temperature: 22.5, humidity: 36.0} |
|
||||||
|
| {time: 2022-01-01T15:00:00, temperature: 22.7, humidity: 36.2} |
|
||||||
|
| {time: 2022-01-01T18:00:00, temperature: 23.3, humidity: 36.9} |
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
||||||
|
## row
|
||||||
|
|
||||||
|
_Alias of [`struct`](#struct)._
|
||||||
|
|
||||||
|
## struct
|
||||||
|
|
||||||
|
Returns an _Arrow struct_ using the specified input expressions optionally named.
|
||||||
|
Fields in the returned struct use the optional name or the `cN` naming convention.
|
||||||
|
Fields in the returned struct use the `cN` naming convention (for example: `c0`, `c1`, `c2`, etc.)
|
||||||
|
unless you specify custom names using the `AS` operator within individual expressions.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
struct(expression1[, ..., expression_n])
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arguments
|
||||||
|
|
||||||
|
- **expression1, expression_n**: Expression to include in the output struct.
|
||||||
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
string operators.
|
||||||
|
|
||||||
|
### Aliases
|
||||||
|
|
||||||
|
- row
|
||||||
|
|
||||||
|
##### Related functions
|
||||||
|
|
||||||
|
[get_field](/influxdb3/version/reference/sql/functions/misc/#get_field)
|
||||||
|
|
||||||
|
{{< expand-wrapper >}}
|
||||||
|
{{% expand "View `struct` query example" %}}
|
||||||
|
|
||||||
|
_The following example uses the
|
||||||
|
{{% influxdb3/home-sample-link %}}._
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
struct(time, temp, hum) AS struct
|
||||||
|
FROM
|
||||||
|
home
|
||||||
|
WHERE
|
||||||
|
room = 'Kitchen'
|
||||||
|
LIMIT 4
|
||||||
|
```
|
||||||
|
|
||||||
|
{{% influxdb/custom-timestamps %}}
|
||||||
|
|
||||||
|
| struct |
|
||||||
|
| :-------------------------------------------- |
|
||||||
|
| {c0: 2022-01-01T13:00:00, c1: 22.8, c2: 36.5} |
|
||||||
|
| {c0: 2022-01-01T12:00:00, c1: 22.5, c2: 36.0} |
|
||||||
|
| {c0: 2022-01-01T15:00:00, c1: 22.7, c2: 36.2} |
|
||||||
|
| {c0: 2022-01-01T18:00:00, c1: 23.3, c2: 36.9} |
|
||||||
|
|
||||||
|
{{% /influxdb/custom-timestamps %}}
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{% expand "View `struct` query example with named fields" %}}
|
||||||
|
|
||||||
|
Use the `AS` operator in a `struct` expression argument to assign a name to the
|
||||||
|
struct field.
|
||||||
|
|
||||||
|
_The following example uses the
|
||||||
|
{{% influxdb3/home-sample-link %}}._
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
struct(time AS 'time', temp AS 'temperature', hum) AS struct
|
||||||
|
FROM
|
||||||
|
home
|
||||||
|
WHERE
|
||||||
|
room = 'Kitchen'
|
||||||
|
LIMIT 4
|
||||||
|
```
|
||||||
|
|
||||||
|
{{% influxdb/custom-timestamps %}}
|
||||||
|
|
||||||
|
| struct |
|
||||||
|
| :------------------------------------------------------- |
|
||||||
|
| {time: 2022-01-01T13:00:00, temperature: 22.8, c2: 36.5} |
|
||||||
|
| {time: 2022-01-01T12:00:00, temperature: 22.5, c2: 36.0} |
|
||||||
|
| {time: 2022-01-01T15:00:00, temperature: 22.7, c2: 36.2} |
|
||||||
|
| {time: 2022-01-01T18:00:00, temperature: 23.3, c2: 36.9} |
|
||||||
|
|
||||||
|
{{% /influxdb/custom-timestamps %}}
|
||||||
|
|
||||||
|
{{% /expand %}}
|
||||||
|
{{< /expand-wrapper >}}
|
||||||
|
|
@ -125,7 +125,7 @@ For example, if you "bin" or "window" data into 15-minute intervals, an input ti
|
||||||
date_bin(interval, expression[, origin_timestamp])
|
date_bin(interval, expression[, origin_timestamp])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **interval**: Bin interval. Supports the following interval units:
|
- **interval**: Bin interval. Supports the following interval units:
|
||||||
|
|
||||||
|
|
@ -197,7 +197,7 @@ date_bin_gapfill(interval, expression[, origin_timestamp])
|
||||||
> `date_bin_gapfill` requires [time bounds](/influxdb/version/query-data/sql/basic-query/#query-data-within-time-boundaries)
|
> `date_bin_gapfill` requires [time bounds](/influxdb/version/query-data/sql/basic-query/#query-data-within-time-boundaries)
|
||||||
> in the `WHERE` clause.
|
> in the `WHERE` clause.
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **interval**: Bin interval. Supports the following interval units:
|
- **interval**: Bin interval. Supports the following interval units:
|
||||||
|
|
||||||
|
|
@ -375,7 +375,7 @@ UTC offset of the input timestamp.
|
||||||
date_bin_wallclock(interval, expression[, origin_timestamp])
|
date_bin_wallclock(interval, expression[, origin_timestamp])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **interval**: Bin interval. Supports the following interval units:
|
- **interval**: Bin interval. Supports the following interval units:
|
||||||
|
|
||||||
|
|
@ -514,7 +514,7 @@ date_bin_wallclock_gapfill(interval, expression[, origin_timestamp])
|
||||||
> `date_bin_wallclock_gapfill` requires [time bounds](/influxdb/version/query-data/sql/basic-query/#query-data-within-time-boundaries)
|
> `date_bin_wallclock_gapfill` requires [time bounds](/influxdb/version/query-data/sql/basic-query/#query-data-within-time-boundaries)
|
||||||
> in the `WHERE` clause.
|
> in the `WHERE` clause.
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **interval**: Bin interval. Supports the following interval units:
|
- **interval**: Bin interval. Supports the following interval units:
|
||||||
|
|
||||||
|
|
@ -690,7 +690,7 @@ Truncates a timestamp value to a specified precision.
|
||||||
date_trunc(precision, expression)
|
date_trunc(precision, expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **precision**: Time precision to truncate to.
|
- **precision**: Time precision to truncate to.
|
||||||
The following precisions are supported:
|
The following precisions are supported:
|
||||||
|
|
@ -778,7 +778,7 @@ Returns the specified part of the date as an integer.
|
||||||
date_part(part, expression)
|
date_part(part, expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **part**: Part of the date to return.
|
- **part**: Part of the date to return.
|
||||||
The following date parts are supported:
|
The following date parts are supported:
|
||||||
|
|
@ -844,7 +844,7 @@ Similar to `date_part`, but with different arguments.
|
||||||
extract(field FROM source)
|
extract(field FROM source)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **field**: Part or field of the date to return.
|
- **field**: Part or field of the date to return.
|
||||||
The following date fields are supported:
|
The following date fields are supported:
|
||||||
|
|
@ -894,7 +894,7 @@ When output to Parquet, the raw integer value (for example, `1641042000`) is pre
|
||||||
from_unixtime(expression)
|
from_unixtime(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Integer expression to operate on.
|
- **expression**: Integer expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -930,7 +930,7 @@ Returns a date using the component parts (year, month, day).
|
||||||
make_date(year, month, day)
|
make_date(year, month, day)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **year**: Year to use when making the date.
|
- **year**: Year to use when making the date.
|
||||||
Can be a constant, column or function, and any combination of arithmetic operators.
|
Can be a constant, column or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1000,7 +1000,7 @@ a [Rust Chrono format string](https://docs.rs/chrono/latest/chrono/format/strfti
|
||||||
to_char(expression, format)
|
to_char(expression, format)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function that results in a date, time, timestamp or duration.
|
Can be a constant, column, or function that results in a date, time, timestamp or duration.
|
||||||
|
|
@ -1042,7 +1042,7 @@ Numeric values are interpreted as days since the
|
||||||
to_date(expression[, ..., format_n])
|
to_date(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1082,7 +1082,7 @@ like daylight saving time (DST).
|
||||||
to_local_time(expression)
|
to_local_time(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Time expression to operate on.
|
- **expression**: Time expression to operate on.
|
||||||
Can be a constant, column, or function.
|
Can be a constant, column, or function.
|
||||||
|
|
@ -1146,7 +1146,7 @@ and return the corresponding RFC3339 timestamp.
|
||||||
to_timestamp(expression)
|
to_timestamp(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1177,7 +1177,7 @@ and return the corresponding RFC3339 timestamp.
|
||||||
to_timestamp_micros(expression[, ..., format_n])
|
to_timestamp_micros(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1223,7 +1223,7 @@ and return the corresponding RFC3339 timestamp.
|
||||||
to_timestamp_millis(expression[, ..., format_n])
|
to_timestamp_millis(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1271,7 +1271,7 @@ and return the corresponding RFC3339 timestamp.
|
||||||
to_timestamp_nanos(expression[, ..., format_n])
|
to_timestamp_nanos(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1317,7 +1317,7 @@ and return the corresponding RFC3339 timestamp.
|
||||||
to_timestamp_seconds(expression[, ..., format_n])
|
to_timestamp_seconds(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments:
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1364,7 +1364,7 @@ are provided.
|
||||||
to_unixtime(expression[, ..., format_n])
|
to_unixtime(expression[, ..., format_n])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
@ -1413,7 +1413,7 @@ Converts a timestamp to a provided timezone. If the second argument is not provi
|
||||||
tz(time_expression[, timezone])
|
tz(time_expression[, timezone])
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
### Arguments
|
||||||
|
|
||||||
- **time_expression**: time to operate on.
|
- **time_expression**: time to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ ORDER BY
|
||||||
{{% /influxdb/custom-timestamps %}}
|
{{% /influxdb/custom-timestamps %}}
|
||||||
|
|
||||||
- [Window frames](#window-frames)
|
- [Window frames](#window-frames)
|
||||||
- [Window function syntax](#window-function-syntax)
|
|
||||||
- [OVER clause](#over-clause)
|
- [OVER clause](#over-clause)
|
||||||
- [PARTITION BY clause](#partition-by-clause)
|
- [PARTITION BY clause](#partition-by-clause)
|
||||||
- [ORDER BY clause](#order-by-clause)
|
- [ORDER BY clause](#order-by-clause)
|
||||||
|
|
@ -566,7 +565,7 @@ ranking order.
|
||||||
ntile(expression)
|
ntile(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: An integer. The number of groups to split the partition into.
|
- **expression**: An integer. The number of groups to split the partition into.
|
||||||
|
|
||||||
|
|
@ -823,7 +822,7 @@ Returns the value from the first row of the window frame.
|
||||||
first_value(expression)
|
first_value(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on. Can be a constant, column, or
|
- **expression**: Expression to operate on. Can be a constant, column, or
|
||||||
function, and any combination of arithmetic operators.
|
function, and any combination of arithmetic operators.
|
||||||
|
|
@ -879,7 +878,7 @@ the function returns the specified default.
|
||||||
lag(expression, offset, default)
|
lag(expression, offset, default)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
|
@ -938,7 +937,7 @@ Returns the value from the last row of the window frame.
|
||||||
last_value(expression)
|
last_value(expression)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on. Can be a constant, column, or
|
- **expression**: Expression to operate on. Can be a constant, column, or
|
||||||
function, and any combination of arithmetic operators.
|
function, and any combination of arithmetic operators.
|
||||||
|
|
@ -995,7 +994,7 @@ the function returns the specified default.
|
||||||
lead(expression, offset, default)
|
lead(expression, offset, default)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: Expression to operate on.
|
- **expression**: Expression to operate on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
|
@ -1055,7 +1054,7 @@ Returns the value from the row that is the nth row of the window frame
|
||||||
nth_value(expression, n)
|
nth_value(expression, n)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Arguments
|
#### Arguments
|
||||||
|
|
||||||
- **expression**: The expression to operator on.
|
- **expression**: The expression to operator on.
|
||||||
Can be a constant, column, or function, and any combination of arithmetic or
|
Can be a constant, column, or function, and any combination of arithmetic or
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue