Merge branch 'master' into feature/cloud-dedicated-user-management-docs
commit
b3ab36e2fc
|
|
@ -31,6 +31,9 @@
|
|||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
#kapa-widget-container {
|
||||
font-family: 'Proxima Nova', sans-serif;
|
||||
}
|
||||
</style>
|
||||
{{#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"
|
||||
|
|
@ -41,6 +44,7 @@
|
|||
<script>
|
||||
// Load Kapa AI widget after DOM content is loaded
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const fontFamily = 'Proxima Nova, sans-serif';
|
||||
const askAI = document.createElement('script');
|
||||
askAI.type = 'text/javascript';
|
||||
askAI.async = true;
|
||||
|
|
@ -53,8 +57,8 @@
|
|||
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-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-width', '65px');
|
||||
askAI.setAttribute('data-button-height', '50px');
|
||||
askAI.setAttribute('data-button-width', '50px');
|
||||
if (window.matchMedia('(max-width: 800px)').matches) {
|
||||
// For mobile devices (smaller than 600px)
|
||||
askAI.setAttribute('data-button-position-bottom', '130px');
|
||||
|
|
@ -62,25 +66,23 @@
|
|||
// For larger screens
|
||||
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-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-full-screen-on-mobile', 'true');
|
||||
askAI.setAttribute('data-modal-header-bg-color', '#d30971');
|
||||
askAI.setAttribute('data-modal-header-border-bottom', 'none');
|
||||
askAI.setAttribute('data-modal-header-padding', '.5rem');
|
||||
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-with-overlay', 'false');
|
||||
askAI.setAttribute('data-modal-inner-flex-direction', 'column');
|
||||
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-size', '640px');
|
||||
askAI.setAttribute('data-modal-title-color', '#fff');
|
||||
askAI.setAttribute('data-modal-title-font-size', '1.25rem');
|
||||
askAI.setAttribute('data-modal-lock-scroll', 'false');
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ function initializeChat({ onChatLoad, chatAttributes }) {
|
|||
modalOverrideOpenClassAskAi: 'ask-ai-open',
|
||||
modalSize: '640px',
|
||||
modalWithOverlay: 'false',
|
||||
modalInnerMaxWidth: '800px',
|
||||
modalXOffset: 'calc(100% - 800px - (40rem * var(--mantine-scale))',
|
||||
modalYOffset: '10vh',
|
||||
userAnalyticsFingerprintEnabled: 'true',
|
||||
fontFamily: 'Proxima Nova, sans-serif',
|
||||
|
|
|
|||
18
compose.yaml
18
compose.yaml
|
|
@ -307,6 +307,7 @@ services:
|
|||
influxdb3-core:
|
||||
container_name: influxdb3-core
|
||||
image: influxdb:3-core
|
||||
pull_policy: always
|
||||
# Set variables (except your auth token) for Core in the .env.3core file.
|
||||
env_file:
|
||||
- .env.3core
|
||||
|
|
@ -316,17 +317,21 @@ services:
|
|||
- influxdb3
|
||||
- serve
|
||||
- --node-id=node0
|
||||
- --log-filter=debug
|
||||
- --object-store=file
|
||||
- --data-dir=/var/lib/influxdb3/data
|
||||
- --plugin-dir=/var/lib/influxdb3/plugins
|
||||
- --log-filter=debug
|
||||
- --verbose
|
||||
volumes:
|
||||
- type: bind
|
||||
source: test/.influxdb3/core/data
|
||||
target: /var/lib/influxdb3/data
|
||||
- type: bind
|
||||
source: test/.influxdb3/core/plugins
|
||||
source: test/.influxdb3/plugins/influxdata
|
||||
target: /var/lib/influxdb3/plugins
|
||||
- type: bind
|
||||
source: test/.influxdb3/core/plugins
|
||||
target: /var/lib/influxdb3/plugins/custom
|
||||
environment:
|
||||
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-core-admin-token
|
||||
secrets:
|
||||
|
|
@ -334,6 +339,7 @@ services:
|
|||
influxdb3-enterprise:
|
||||
container_name: influxdb3-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.
|
||||
env_file:
|
||||
- .env.3ent
|
||||
|
|
@ -344,10 +350,11 @@ services:
|
|||
- serve
|
||||
- --node-id=node0
|
||||
- --cluster-id=cluster0
|
||||
- --log-filter=debug
|
||||
- --object-store=file
|
||||
- --data-dir=/var/lib/influxdb3/data
|
||||
- --plugin-dir=/var/lib/influxdb3/plugins
|
||||
- --log-filter=debug
|
||||
- --verbose
|
||||
environment:
|
||||
- INFLUXDB3_AUTH_TOKEN=/run/secrets/influxdb3-enterprise-admin-token
|
||||
volumes:
|
||||
|
|
@ -355,8 +362,11 @@ services:
|
|||
source: test/.influxdb3/enterprise/data
|
||||
target: /var/lib/influxdb3/data
|
||||
- type: bind
|
||||
source: test/.influxdb3/enterprise/plugins
|
||||
source: test/.influxdb3/plugins/influxdata
|
||||
target: /var/lib/influxdb3/plugins
|
||||
- type: bind
|
||||
source: test/.influxdb3/enterprise/plugins
|
||||
target: /var/lib/influxdb3/plugins/custom
|
||||
secrets:
|
||||
- influxdb3-enterprise-admin-token
|
||||
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:
|
||||
name: Hashing
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 313
|
||||
|
||||
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:
|
||||
name: Miscellaneous
|
||||
parent: sql-functions
|
||||
weight: 310
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Regular expression
|
||||
parent: sql-functions
|
||||
weight: 308
|
||||
weight: 312
|
||||
influxdb3/cloud-dedicated/tags: [regular expressions, sql]
|
||||
|
||||
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:
|
||||
name: Window
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 315
|
||||
|
||||
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:
|
||||
name: Hashing
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 313
|
||||
|
||||
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:
|
||||
name: Miscellaneous
|
||||
parent: sql-functions
|
||||
weight: 310
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Regular expression
|
||||
parent: sql-functions
|
||||
weight: 308
|
||||
weight: 312
|
||||
influxdb3/cloud-serverless/tags: [regular expressions, sql]
|
||||
|
||||
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:
|
||||
name: Window
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 315
|
||||
|
||||
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:
|
||||
name: Hashing
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 313
|
||||
|
||||
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:
|
||||
name: Miscellaneous
|
||||
parent: sql-functions
|
||||
weight: 310
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Regular expression
|
||||
parent: sql-functions
|
||||
weight: 308
|
||||
weight: 312
|
||||
influxdb3/clustered/tags: [regular expressions, sql]
|
||||
|
||||
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:
|
||||
name: Window
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 315
|
||||
|
||||
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:
|
||||
name: Cache
|
||||
parent: sql-functions
|
||||
weight: 311
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Hashing
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 313
|
||||
|
||||
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:
|
||||
name: Miscellaneous
|
||||
parent: sql-functions
|
||||
weight: 310
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Regular expression
|
||||
parent: sql-functions
|
||||
weight: 308
|
||||
weight: 312
|
||||
influxdb3/core/tags: [regular expressions, sql]
|
||||
|
||||
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:
|
||||
name: Window
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 315
|
||||
|
||||
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:
|
||||
name: Cache
|
||||
parent: sql-functions
|
||||
weight: 311
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Hashing
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 313
|
||||
|
||||
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:
|
||||
name: Miscellaneous
|
||||
parent: sql-functions
|
||||
weight: 310
|
||||
weight: 314
|
||||
|
||||
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:
|
||||
name: Regular expression
|
||||
parent: sql-functions
|
||||
weight: 308
|
||||
weight: 312
|
||||
influxdb3/enterprise/tags: [regular expressions, sql]
|
||||
|
||||
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:
|
||||
name: Window
|
||||
parent: sql-functions
|
||||
weight: 309
|
||||
weight: 315
|
||||
|
||||
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**.
|
||||
|
||||
<!-- BEGIN TOC -->
|
||||
- [Run the InfluxDB 3 Explorer Docker container](#run-the-influxdb-3-explorer-docker-container)
|
||||
- [Enable TLS/SSL (HTTPS)](#enable-tlsssl-https)
|
||||
- [Pre-configure InfluxDB connection settings](#pre-configure-influxdb-connection-settings)
|
||||
- [Run in query or admin mode](#run-in-query-or-admin-mode)
|
||||
- [Run in query mode](#run-in-query-mode)
|
||||
- [Run in admin mode](#run-in-admin-mode)
|
||||
- [Environment Variables](#environment-variables)
|
||||
- [Volume Reference](#volume-reference)
|
||||
- [Exposed Ports](#exposed-ports)
|
||||
- [Custom port mapping](#custom-port-mapping)
|
||||
- [Quick start](#quick-start)
|
||||
- [Installation methods](#installation-methods)
|
||||
- [Configuration options](#configuration-options)
|
||||
- [Persist data across restarts](#persist-data-across-restarts)
|
||||
- [Pre-configure InfluxDB connections](#pre-configure-influxdb-connections)
|
||||
- [Enable TLS/SSL (HTTPS)](#enable-tlsssl-https)
|
||||
- [Choose operational mode](#choose-operational-mode)
|
||||
- [Advanced configuration](#advanced-configuration)
|
||||
- [Environment variables](#environment-variables)
|
||||
- [Volume reference](#volume-reference)
|
||||
- [Port reference](#port-reference)
|
||||
- [Complete examples](#complete-examples)
|
||||
<!-- 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
|
||||
[Docker Desktop](https://docs.docker.com/desktop/).
|
||||
1. **Run the Explorer container:**
|
||||
|
||||
2. **Pull the {{% product-name %}} Docker image**
|
||||
```bash
|
||||
docker run --detach \
|
||||
--name influxdb3-explorer \
|
||||
--publish 8888:80 \
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
```
|
||||
|
||||
```bash
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
```
|
||||
2. **Access the Explorer UI at <http://localhost:8888>**
|
||||
|
||||
3. **Create local directories** _(optional)_
|
||||
|
||||
{{% 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>**.
|
||||
3. **[Configure your InfluxDB connection in the UI](/influxdb3/explorer/get-started)**
|
||||
|
||||
---
|
||||
|
||||
## 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`
|
||||
- Private key: `server.key`
|
||||
> [!Tip]
|
||||
> 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**
|
||||
|
||||
Include the following options when running your Docker container:
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[Docker run](#)
|
||||
[Docker Compose](#)
|
||||
{{% /code-tabs %}}
|
||||
|
||||
```sh
|
||||
--volume $(pwd)/ssl:/etc/nginx/ssl:ro \
|
||||
--publish 8888:443
|
||||
```
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
docker run --detach \
|
||||
--name influxdb3-explorer \
|
||||
--publish 8888:80 \
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
|
||||
The nginx web server automatically uses certificate files when they are present
|
||||
in the mounted path.
|
||||
{{% code-tab-content %}}
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
> [!Note]
|
||||
> You can use a custom location for certificate and key files.
|
||||
> Use the [`SSL_CERT_PATH`](#ssl_cert_path) and [`SSL_KEY_PATH`](#ssl_key_path)
|
||||
> environment variables to identify the custom location.
|
||||
> Also update the SSL directory volume mount path inside the container.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
services:
|
||||
explorer:
|
||||
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
container_name: influxdb3-explorer
|
||||
ports:
|
||||
- "8888:80"
|
||||
volumes:
|
||||
- ./config:/app-root/config:ro
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### Run in admin mode
|
||||
Start the container:
|
||||
|
||||
```sh
|
||||
docker run \
|
||||
...
|
||||
```bash
|
||||
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
|
||||
```
|
||||
{{% /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
|
||||
in your container.
|
||||
### Persist data across restarts
|
||||
|
||||
- [DATABASE_URL](#database_url)
|
||||
- [SESSION_SECRET_KEY](#session_secret_key)
|
||||
- [SSL_CERT_PATH](#ssl_cert_path)
|
||||
- [SSL_KEY_PATH](#ssl_key_path)
|
||||
{{% product-name %}} stores application data in a SQLite database. To persist this data across container restarts:
|
||||
|
||||
### 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 >}}
|
||||
{{% expand "View `DATABASE_URL` example" %}}
|
||||
<!-- pytest.mark.skip -->
|
||||
2. **Mount the directory when running the container:**
|
||||
|
||||
```bash
|
||||
docker run --detach \
|
||||
# ...
|
||||
--volume $(pwd)/db:/custom/db-path:rw \
|
||||
--env DATABASE_URL=/custom/db-path/sqlite.db \
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[Docker](#)
|
||||
[Docker Compose](#)
|
||||
{{% /code-tabs %}}
|
||||
|
||||
### 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
|
||||
uses a random 32-byte hex string as the session secret key.
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View `SESSION_SECRET_KEY` example" %}}
|
||||
<!-- pytest.mark.skip -->
|
||||
|
||||
```bash
|
||||
docker run --detach \
|
||||
# ...
|
||||
--env SESSION_SECRET_KEY=xxX0Xx000xX0XxxxX0Xx000xX0XxX00x \
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
{{% code-tab-content %}}
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
explorer:
|
||||
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
container_name: influxdb3-explorer
|
||||
ports:
|
||||
- "8888:80"
|
||||
volumes:
|
||||
- ./db:/db:rw
|
||||
restart: unless-stopped
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
> [!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
|
||||
> not explicitly set. For production use cases, always set the `SESSION_SECRET_KEY`
|
||||
> environment variable to persist sessions across restarts.
|
||||
> ```bash
|
||||
> openssl rand -hex 32
|
||||
> ```
|
||||
|
||||
### SSL_CERT_PATH
|
||||
### Volume reference
|
||||
|
||||
Defines the path to the SSL certificate file inside the container.
|
||||
Default is `/etc/nginx/ssl/cert.pem`.
|
||||
| Container Path | Purpose | Permissions | Required |
|
||||
|----------------|---------|-------------|----------|
|
||||
| `/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 >}}
|
||||
{{% expand "View `SSL_CERT_PATH` example" %}}
|
||||
<!-- pytest.mark.skip -->
|
||||
### Port reference
|
||||
|
||||
| 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
|
||||
docker run --detach \
|
||||
# ...
|
||||
--volume $(pwd)/ssl:/custom/ssl:ro \
|
||||
--env SSL_CERT_PATH=/custom/ssl/cert.pem \
|
||||
influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
SESSION_SECRET_KEY=your_32_char_hex_string_here
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
### SSL_KEY_PATH
|
||||
|
||||
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 -->
|
||||
Start the container:
|
||||
|
||||
```bash
|
||||
docker run --detach \
|
||||
# ...
|
||||
--volume $(pwd)/ssl:/custom/ssl:ro \
|
||||
--env SSL_KEY_PATH=/custom/ssl/key.pem \
|
||||
docker-compose up -d
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /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 %}}
|
||||
```
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
{{% /code-tab-content %}}
|
||||
|
||||
## Volume Reference
|
||||
{{% code-tab-content %}}
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
| Container Path | Purpose | Host Example |
|
||||
|----------------------|------------------------------|----------------------------|
|
||||
| `/db` | SQLite DB storage | `./db` |
|
||||
| `/app-root/config` | JSON config for defaults | `./config` |
|
||||
| `/etc/nginx/ssl` | SSL certs for HTTPS | `./ssl` |
|
||||
|
||||
## 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
|
||||
services:
|
||||
explorer:
|
||||
image: influxdata/influxdb3-ui:{{% latest-patch %}}
|
||||
container_name: influxdb3-explorer-dev
|
||||
ports:
|
||||
- "8888:80"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
|
|
|||
|
|
@ -175,10 +175,6 @@ influxdb3 serve
|
|||
- [TCP Listeners](#tcp-listeners)
|
||||
- [tcp-listener-file-path](#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.
|
||||
|
||||
This option supports the following values:
|
||||
|
||||
- `stdout` _(default)_
|
||||
- `stderr`
|
||||
|
||||
**Default:** `stdout`
|
||||
|
||||
| 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 |
|
||||
| :---------------------------------------------- | :-------------------------------------------------------- |
|
||||
| `--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.
|
||||
|
||||
> [!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.
|
||||
|
||||
```sql
|
||||
|
|
@ -524,7 +524,7 @@ GROUP BY location
|
|||
|
||||
### mean
|
||||
|
||||
_Alias of [avg](#avg)._
|
||||
_Alias of [`avg`](#avg)._
|
||||
|
||||
### median
|
||||
|
||||
|
|
@ -1403,7 +1403,7 @@ GROUP BY room
|
|||
|
||||
### var_population
|
||||
|
||||
_Alias of [var_pop](#var_pop)._
|
||||
_Alias of [`var_pop`](#var_pop)._
|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression containing encoded string data.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression containing string or binary data.
|
||||
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)
|
||||
```
|
||||
|
||||
#### Arguments
|
||||
### Arguments
|
||||
|
||||
- **table_name**: Name of the table associated with the distinct value cache
|
||||
_(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)_.
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
|
|
@ -38,11 +38,11 @@ Returns data from an {{< product-name >}} last value cache.
|
|||
last_cache(table_name, cache_name)
|
||||
```
|
||||
|
||||
#### Arguments
|
||||
### Arguments
|
||||
|
||||
- **table_name**: Name of the table associated with the last value cache
|
||||
_(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)_.
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,13 @@ The {{< product-name >}} SQL implementation supports the following conditional
|
|||
functions for conditionally handling _null_ values:
|
||||
|
||||
- [coalesce](#coalesce)
|
||||
- [greatest](#greatest)
|
||||
- [ifnull](#ifnull)
|
||||
- [least](#least)
|
||||
- [nullif](#nullif)
|
||||
- [nvl](#nvl)
|
||||
- [nvl2](#nvl2)
|
||||
|
||||
<!-- Will come with next DataFusion upgrade
|
||||
- [greatest](#greatest)
|
||||
- [least](#least)
|
||||
-->
|
||||
|
||||
## coalesce
|
||||
|
||||
Returns the first of its arguments that is not _null_.
|
||||
|
|
@ -56,7 +53,7 @@ FROM
|
|||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
<!--
|
||||
|
||||
## greatest
|
||||
|
||||
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)._
|
||||
|
||||
```sql
|
||||
SELECT greatest(a, b) AS greatest FROM numbers LIMIT 4
|
||||
SELECT time, greatest(a, b) AS greatest FROM numbers LIMIT 4
|
||||
```
|
||||
|
||||
| time | greatest |
|
||||
| ------------------- | ------------------: |
|
||||
| 2023-01-01T00:02:00 | -0.482943221384294 |
|
||||
| 2023-01-01T00:03:00 | -0.0729732928756677 |
|
||||
| 2023-01-01T00:04:00 | 1.77857552719844 |
|
||||
| 2023-01-01T00:05:00 | 0.741147445214238 |
|
||||
| time | greatest |
|
||||
| :------------------ | -----------------: |
|
||||
| 2023-01-01T01:20:00 | -0.515490223280789 |
|
||||
| 2023-01-01T01:21:00 | 0.803201312042983 |
|
||||
| 2023-01-01T01:22:00 | 0.970938142399892 |
|
||||
| 2023-01-01T01:23:00 | 0.0493748366311344 |
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
-->
|
||||
|
||||
## ifnull
|
||||
|
||||
_Alias of [nvl](#nvl)._
|
||||
|
||||
<!--
|
||||
## least
|
||||
|
||||
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)._
|
||||
|
||||
```sql
|
||||
SELECT least(a, b) AS least FROM numbers LIMIT 4
|
||||
SELECT time, least(a, b) AS least FROM numbers LIMIT 4
|
||||
```
|
||||
|
||||
| time | least |
|
||||
| ------------------- | -----------------: |
|
||||
| 2023-01-01T00:02:00 | -0.921037167720451 |
|
||||
| 2023-01-01T00:03:00 | -0.73880754843378 |
|
||||
| 2023-01-01T00:04:00 | -0.905980032168252 |
|
||||
| 2023-01-01T00:05:00 | -0.891164752631417 |
|
||||
| :------------------ | -----------------: |
|
||||
| 2023-01-01T00:10:00 | -1.08759833527982 |
|
||||
| 2023-01-01T00:11:00 | -0.187620086586211 |
|
||||
| 2023-01-01T00:12:00 | -0.81371037157091 |
|
||||
| 2023-01-01T00:13:00 | -0.339781659874945 |
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
-->
|
||||
|
||||
## nullif
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Computes the binary hash of an expression using the specified algorithm.
|
|||
digest(expression, algorithm)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression_y**: First numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of operators.
|
||||
|
|
@ -455,7 +455,7 @@ Converts radians to degrees.
|
|||
degrees(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to use as the exponent.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
Must be an integer (`BIGINT`).
|
||||
|
|
@ -551,7 +551,7 @@ Returns the nearest integer less than or equal to a number.
|
|||
floor(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression_x**: First numeric expression to operate on.
|
||||
Must be an integer (`BIGINT`).
|
||||
|
|
@ -619,7 +619,7 @@ Returns `true` if a given number is ±NaN, otherwise returns `false`.
|
|||
isnan(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
Must be a float (`DOUBLE`).
|
||||
|
|
@ -658,7 +658,7 @@ Returns `true` if the given number is ±0.0, otherwise returns `false`.
|
|||
iszero(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression_x**: First numeric expression to operate on.
|
||||
Must be an integer (`BIGINT`).
|
||||
|
|
@ -733,7 +733,7 @@ Returns the natural logarithm of a number.
|
|||
ln(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression_x**: Numeric expression to return if it’s not `NaN`.
|
||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||
|
|
@ -934,7 +934,7 @@ power(base, exponent)
|
|||
|
||||
- `pow`
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **base**: Numeric expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||
|
|
@ -971,7 +971,7 @@ Converts degrees to radians.
|
|||
radians(numeric_expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **numeric_expression**: Numeric expression to operate on.
|
||||
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_typeof](#arrow_typeof)
|
||||
- [get_field](#get_field)
|
||||
- [interpolate](#interpolate)
|
||||
- [locf](#locf)
|
||||
- [version](#version)
|
||||
<!-- - [struct](#struct) -->
|
||||
|
||||
## arrow_cast
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ Casts a value to a specific Arrow data type.
|
|||
arrow_cast(expression, datatype)
|
||||
```
|
||||
|
||||
#### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to cast.
|
||||
Can be a constant, column, or function, and any combination of arithmetic or
|
||||
|
|
@ -55,7 +55,7 @@ of the expression:
|
|||
arrow_typeof(expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to evaluate.
|
||||
Can be a constant, column, or function, and any combination of arithmetic or
|
||||
|
|
@ -84,6 +84,66 @@ LIMIT 1
|
|||
{{% /expand %}}
|
||||
{{< /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
|
||||
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **aggregate_expression**: Aggregate operation on a specified expression.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **aggregate_expression**: Aggregate operation on a specified expression.
|
||||
The operation can use any [aggregate function](/influxdb/version/reference/sql/functions/aggregate/).
|
||||
|
|
@ -206,34 +266,6 @@ GROUP BY _time, room
|
|||
{{% /expand %}}
|
||||
{{< /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
|
||||
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of operators.
|
||||
|
|
@ -62,7 +62,7 @@ false otherwise.
|
|||
regexp_like(str, regexp[, flags])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to concatenate.
|
||||
Can be a constant, column, or function, and any combination of string operators.
|
||||
|
|
@ -233,7 +233,7 @@ concat(str[, ..., str_n])
|
|||
|
||||
##### Related functions
|
||||
|
||||
[contcat_ws](#contcat_ws)
|
||||
[concat_ws](#concat_ws)
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "View `concat` query example" %}}
|
||||
|
|
@ -268,7 +268,7 @@ Concatenates multiple strings together with a specified separator.
|
|||
concat_ws(separator, str[, ..., str_n])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **separator**: Separator to insert between concatenated strings.
|
||||
- **str**: String expression to concatenate.
|
||||
|
|
@ -313,7 +313,7 @@ Returns true if a string contains a search string (case-sensitive).
|
|||
contains(str, search_str)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to test.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to find in `strlist`.
|
||||
- **strlist**: A string containing a comma-delimited list of substrings.
|
||||
|
|
@ -402,7 +402,7 @@ Words are delimited by non-alphanumeric characters.
|
|||
initcap(str)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of string operators.
|
||||
|
|
@ -570,7 +570,7 @@ between two strings.
|
|||
levenshtein(str1, str2)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
- **str1**: First string expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of string operators.
|
||||
- **str2**: Second string expression to operate on.
|
||||
|
|
@ -608,7 +608,7 @@ Converts a string to lower-case.
|
|||
lower(str)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **substr**: Substring expression to search for.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to repeat.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to repeat.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to repeat.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of string operators.
|
||||
|
|
@ -1081,7 +1081,7 @@ specified position.
|
|||
split_part(str, delimiter, pos)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to spit.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to test.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **int**: Integer expression to convert.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **str**: String expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **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)
|
||||
> in the `WHERE` clause.
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **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)
|
||||
> in the `WHERE` clause.
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **interval**: Bin interval. Supports the following interval units:
|
||||
|
||||
|
|
@ -690,7 +690,7 @@ Truncates a timestamp value to a specified precision.
|
|||
date_trunc(precision, expression)
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **precision**: Time precision to truncate to.
|
||||
The following precisions are supported:
|
||||
|
|
@ -778,7 +778,7 @@ Returns the specified part of the date as an integer.
|
|||
date_part(part, expression)
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **part**: Part of the date to return.
|
||||
The following date parts are supported:
|
||||
|
|
@ -844,7 +844,7 @@ Similar to `date_part`, but with different arguments.
|
|||
extract(field FROM source)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **field**: Part or field of the date to return.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Integer expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **year**: Year to use when making the date.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
###### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Time expression to operate on.
|
||||
Can be a constant, column, or function.
|
||||
|
|
@ -1146,7 +1146,7 @@ and return the corresponding RFC3339 timestamp.
|
|||
to_timestamp(expression)
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments:
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||
|
|
@ -1364,7 +1364,7 @@ are provided.
|
|||
to_unixtime(expression[, ..., format_n])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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])
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
### Arguments
|
||||
|
||||
- **time_expression**: time to operate on.
|
||||
Can be a constant, column, or function, and any combination of arithmetic operators.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ ORDER BY
|
|||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
- [Window frames](#window-frames)
|
||||
- [Window function syntax](#window-function-syntax)
|
||||
- [OVER clause](#over-clause)
|
||||
- [PARTITION BY clause](#partition-by-clause)
|
||||
- [ORDER BY clause](#order-by-clause)
|
||||
|
|
@ -566,7 +565,7 @@ ranking order.
|
|||
ntile(expression)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on. Can be a constant, column, or
|
||||
function, and any combination of arithmetic operators.
|
||||
|
|
@ -879,7 +878,7 @@ the function returns the specified default.
|
|||
lag(expression, offset, default)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on. Can be a constant, column, or
|
||||
function, and any combination of arithmetic operators.
|
||||
|
|
@ -995,7 +994,7 @@ the function returns the specified default.
|
|||
lead(expression, offset, default)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: Expression to operate on.
|
||||
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)
|
||||
```
|
||||
|
||||
##### Arguments
|
||||
#### Arguments
|
||||
|
||||
- **expression**: The expression to operator on.
|
||||
Can be a constant, column, or function, and any combination of arithmetic or
|
||||
|
|
|
|||
Loading…
Reference in New Issue