Develop with the InfluxDB API
-Build your application using the InfluxDB Cloud and InfluxDB OSS APIs.
+Develop with the InfluxDB v2 API
+Build your application using the InfluxDB Cloud and InfluxDB OSS v2 APIs.
The examples above represent 2020-01-01T00:00:00Z UTC.
+ +Related entries: +[timestamp](#timestamp), +[RFC3339 timestamp](#rfc3339-timestamp) + +### unsigned integer + +A whole number that is positive or zero (`0`, `143`). Also known as a "uinteger." +InfluxDB supports 64-bit unsigned integers (minimum: `0`, maximum: `18446744073709551615`). + +Related entries: +[integer](#integer) + +### user + +InfluxDB users are granted permission to access to InfluxDB. + +## V + +### values per second + +The preferred measurement of the rate at which data are persisted to InfluxDB. +Write speeds are generally quoted in values per second. + +To calculate the values per second rate, multiply the number of points written +per second by the number of values stored per point. +For example, if the points have four fields each, and a batch of 5000 points is +written 10 times per second, the values per second rate is: + +**4 field values per point** × **5000 points per batch** × **10 batches per second** = **200,000 values per second** + +Related entries: +[batch](#batch), +[field](#field), +[point](#point) + +### variable + +A storage location (identified by a memory address) paired with an associated +symbolic name (an identifier). +A variable contains some known or unknown quantity of information referred to as a value. + +### variable assignment + +A statement that sets or updates the value stored in a variable. + +## W + +### WAL (Write Ahead Log) - enterprise + +The temporary cache for recently written points. +To reduce the frequency that permanent storage files are accessed, InfluxDB +caches new points in the WAL until their total size or age triggers a flush to +more permanent storage. This allows for efficient batching of the writes into the TSM. + +Points in the WAL can be queried and persist through a system reboot. +On process start, all points in the WAL must be flushed before the system accepts new writes. + +Related entries: +[tsm](#tsm-time-structured-merge-tree) + +### windowing + +Grouping data based on specified time intervals. +This is also referred to as "time binning" or "date binning." diff --git a/content/influxdb/cloud-dedicated/reference/internals/_index.md b/content/influxdb/cloud-dedicated/reference/internals/_index.md new file mode 100644 index 000000000..f59a65ae6 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/internals/_index.md @@ -0,0 +1,11 @@ +--- +title: InfluxDB internals +description: > + Learn about internal systems and implementation details of InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + parent: Reference +weight: 108 +--- + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md b/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md new file mode 100644 index 000000000..cef488d42 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/internals/arrow-flightsql.md @@ -0,0 +1,68 @@ +--- +title: Arrow Flight SQL +description: > + The InfluxDB SQL implementation uses **Arrow Flight SQL** to query InfluxDB + and return results. +menu: + influxdb_cloud_dedicated: + parent: InfluxDB internals +weight: 101 +related: + - /influxdb/cloud-dedicated/reference/sql/ +--- + +The InfluxDB SQL implementation uses [Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html) +to query InfluxDB and return results. + +> Arrow Flight SQL is a protocol for interacting with SQL databases using the +> Arrow in-memory format and the [Flight RPC](https://arrow.apache.org/docs/format/Flight.html) +> framework. +> +> {{% cite %}}-- [Arrow Flight SQL documentation](https://arrow.apache.org/docs/format/FlightSql.html){{% /cite %}} + +Flight SQL uses the RPC methods defined in the in Flight RPC framework and provides +various commands that pair those methods with request and response messages. +The InfluxDB Flight SQL implementation supports the following Flight SQL commands: + +### Flight SQL metadata commands + +{{% caption %}} +_For command descriptions, see the +[Arrow Flight SQL RPC methods documentation](https://arrow.apache.org/docs/format/FlightSql.html#sql-metadata)_. +{{% /caption %}} + +| Message | Supported | +| :----------------------- | :----------------------: | +| CommandGetCatalogs | **{{% icon "check" %}}** | +| CommandGetDbSchemas | **{{% icon "check" %}}** | +| CommandGetTables | **{{% icon "check" %}}** | +| CommandGetTableTypes | **{{% icon "check" %}}** | +| CommandGetSqlInfo | **{{% icon "check" %}}** | +| CommandGetPrimaryKeys | **{{% icon "check" %}}** | +| CommandGetExportedKeys | **{{% icon "check" %}}** | +| CommandGetImportedKeys | **{{% icon "check" %}}** | +| CommandGetCrossReference | **{{% icon "check" %}}** | +| CommandGetXdbcTypeInfo | | + +### Flight SQL query execution commands + +{{% caption %}} +_For command descriptions, see the +[Arrow Flight SQL RPC methods documentation](https://arrow.apache.org/docs/format/FlightSql.html#query-execution)_. +{{% /caption %}} + +| Message | Supported | +| :--------------------------------------- | :----------------------: | +| ActionCreatePreparedStatementRequest | | +| ActionCreatePreparedSubstraitPlanRequest | | +| ActionClosePreparedStatementRequest | | +| ActionBeginTransactionRequest | | +| ActionBeginSavepointRequest | | +| ActionBeginSavepointResult | | +| ActionEndTransactionRequest | | +| ActionEndSavepointRequest | | +| CommandStatementQuery | **{{% icon "check" %}}** | +| CommandStatementSubstraitPlan | | +| CommandPreparedStatementQuery | **{{% icon "check" %}}** | +| CommandPreparedStatementUpdate | | +| ActionCancelQueryRequest | | diff --git a/content/influxdb/cloud-iox/reference/sql/_index.md b/content/influxdb/cloud-dedicated/reference/sql/_index.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/_index.md rename to content/influxdb/cloud-dedicated/reference/sql/_index.md index 87644c252..cf6eac9de 100644 --- a/content/influxdb/cloud-iox/reference/sql/_index.md +++ b/content/influxdb/cloud-dedicated/reference/sql/_index.md @@ -3,13 +3,15 @@ title: SQL reference documentation description: > Learn the SQL syntax and structure used to query InfluxDB. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: SQL reference parent: Reference weight: 101 +related: + - /influxdb/cloud-dedicated/reference/internals/arrow-flightsql/ --- -InfluxDB Cloud backed by InfluxDB IOx uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. +InfluxDB Cloud Dedicated uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. - [Identifiers](#identifiers) - [Quoting and case sensitivity](#quoting-and-case-sensitivity) diff --git a/content/influxdb/cloud-iox/reference/sql/data-types.md b/content/influxdb/cloud-dedicated/reference/sql/data-types.md similarity index 95% rename from content/influxdb/cloud-iox/reference/sql/data-types.md rename to content/influxdb/cloud-dedicated/reference/sql/data-types.md index 3968dd97d..a5cdbf833 100644 --- a/content/influxdb/cloud-iox/reference/sql/data-types.md +++ b/content/influxdb/cloud-dedicated/reference/sql/data-types.md @@ -5,15 +5,15 @@ description: > The InfluxDB SQL implementation supports a number of data types including 64-bit integers, double-precision floating point numbers, strings, and more. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Data types parent: SQL reference weight: 200 related: - - /influxdb/cloud-iox/query-data/sql/cast-types/ + - /influxdb/cloud-dedicated/query-data/sql/cast-types/ --- -InfluxDB Cloud backed by InfluxDB IOx uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. +InfluxDB Cloud Dedicated uses the [Apache Arrow DataFusion](https://arrow.apache.org/datafusion/) implementation of SQL. Data types define the type of values that can be stored in table columns. In InfluxDB's SQL implementation, a **measurement** is structured as a table, and **tags**, **fields** and **timestamps** are exposed as columns. diff --git a/content/influxdb/cloud-iox/reference/sql/explain.md b/content/influxdb/cloud-dedicated/reference/sql/explain.md similarity index 99% rename from content/influxdb/cloud-iox/reference/sql/explain.md rename to content/influxdb/cloud-dedicated/reference/sql/explain.md index cc1d55c61..128717124 100644 --- a/content/influxdb/cloud-iox/reference/sql/explain.md +++ b/content/influxdb/cloud-dedicated/reference/sql/explain.md @@ -4,7 +4,7 @@ description: > The `EXPLAIN` command shows the logical and physical execution plan for the specified SQL statement. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: EXPLAIN command parent: SQL reference weight: 207 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/_index.md b/content/influxdb/cloud-dedicated/reference/sql/functions/_index.md similarity index 82% rename from content/influxdb/cloud-iox/reference/sql/functions/_index.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/_index.md index aee11cc40..2140890fa 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/_index.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/_index.md @@ -4,7 +4,7 @@ list_title: Functions description: > Use SQL functions to transform queried values. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Functions parent: SQL reference identifier: sql-functions diff --git a/content/influxdb/cloud-iox/reference/sql/functions/aggregate.md b/content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md similarity index 89% rename from content/influxdb/cloud-iox/reference/sql/functions/aggregate.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md index 837dffe83..f09dfe32e 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/aggregate.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/aggregate.md @@ -4,12 +4,12 @@ list_title: Aggregate functions description: > Aggregate data with SQL aggregate functions. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Aggregate parent: sql-functions weight: 301 related: - - /influxdb/cloud-iox/query-data/sql/aggregate-select/ + - /influxdb/cloud-dedicated/query-data/sql/aggregate-select/ --- SQL aggregate functions aggregate values in a specified column for each @@ -131,7 +131,7 @@ max(expression) ``` _To return both the maximum value and its associated timestamp, use -[`selector_max`](/influxdb/cloud-iox/reference/sql/functions/selector/#selector_max)._ +[`selector_max`](/influxdb/cloud-dedicated/reference/sql/functions/selector/#selector_max)._ ##### Arguments @@ -170,7 +170,7 @@ min(expression) ``` _To return both the minimum value and its associated timestamp, use -[`selector_max`](/influxdb/cloud-iox/reference/sql/functions/selector/#selector_min)._ +[`selector_max`](/influxdb/cloud-dedicated/reference/sql/functions/selector/#selector_min)._ ##### Arguments @@ -259,7 +259,7 @@ corr(expression1, expression2) {{% expand "View `corr` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -294,7 +294,7 @@ covar(expression1, expression2) {{% expand "View `covar` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -329,7 +329,7 @@ covar_pop(expression1, expression2) {{% expand "View `covar_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -364,7 +364,7 @@ covar_samp(expression1, expression2) {{% expand "View `covar_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -399,7 +399,7 @@ stddev(expression) {{% expand "View `stddev` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -434,7 +434,7 @@ stddev_pop(expression) {{% expand "View `stddev_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -469,7 +469,7 @@ stddev_samp(expression) {{% expand "View `stddev_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -504,7 +504,7 @@ var(expression) {{% expand "View `var` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -539,7 +539,7 @@ var_pop(expression) {{% expand "View `var_pop` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -574,7 +574,7 @@ var_samp(expression) {{% expand "View `var_samp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -617,7 +617,7 @@ approx_distinct(expression) {{% expand "View `approx_distinct` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -653,7 +653,7 @@ approx_median(expression) {{% expand "View `approx_median` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -694,7 +694,7 @@ approx_percentile_cont(expression, percentile, centroids) {{% expand "View `approx_percentile_cont` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -733,7 +733,7 @@ approx_percentile_cont_with_weight(expression, weight, percentile) {{% expand "View `approx_percentile_cont_with_weight` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/conditional.md b/content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/functions/conditional.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md index 11a1294fb..83821a2c2 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/conditional.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/conditional.md @@ -4,7 +4,7 @@ list_title: Conditional functions description: > Use conditional functions to conditionally handle null values in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Conditional parent: sql-functions weight: 306 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/math.md b/content/influxdb/cloud-dedicated/reference/sql/functions/math.md similarity index 85% rename from content/influxdb/cloud-iox/reference/sql/functions/math.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/math.md index f906add01..c95c290c1 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/math.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/math.md @@ -4,7 +4,7 @@ list_title: Math functions description: > Use math functions to perform mathematical operations in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Math parent: sql-functions weight: 306 @@ -51,7 +51,7 @@ abs(numeric_expression) {{% expand "View `abs` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT abs(temp) AS abs FROM home LIMIT 3 @@ -83,7 +83,7 @@ acos(numeric_expression) {{% expand "View `acos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT acos(temp * .01) AS acos FROM home LIMIT 3 @@ -115,7 +115,7 @@ asin(numeric_expression) {{% expand "View `asin` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT asin(temp * .01) AS asin FROM home LIMIT 3 @@ -147,7 +147,7 @@ atan(numeric_expression) {{% expand "View `atan` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT atan(temp * .01) AS atan FROM home LIMIT 3 @@ -181,7 +181,7 @@ atan2(expression_y, expression_x) {{% expand "View `atan2` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT atan2(temp, hum) AS atan2 FROM home LIMIT 3 @@ -213,7 +213,7 @@ ceil(numeric_expression) {{% expand "View `ceil` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT ceil(temp) AS ceil FROM home LIMIT 3 @@ -245,7 +245,7 @@ cos(numeric_expression) {{% expand "View `cos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT cos(temp) AS cos FROM home LIMIT 3 @@ -277,7 +277,7 @@ exp(numeric_expression) {{% expand "View `exp` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT exp(temp) AS exp FROM home LIMIT 3 @@ -309,7 +309,7 @@ floor(numeric_expression) {{% expand "View `floor` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT floor(temp) AS floor FROM home LIMIT 3 @@ -341,7 +341,7 @@ ln(numeric_expression) {{% expand "View `ln` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT ln(temp) AS ln FROM home LIMIT 3 @@ -373,7 +373,7 @@ log10(numeric_expression) {{% expand "View `log10` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT log10(temp) AS log10 FROM home LIMIT 3 @@ -405,7 +405,7 @@ log2(numeric_expression) {{% expand "View `log2` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT log2(temp) AS log2 FROM home LIMIT 3 @@ -439,7 +439,7 @@ power(base, exponent) {{% expand "View `power` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT power(temp, hum * .1) AS power FROM home LIMIT 3 @@ -467,7 +467,7 @@ random() {{% expand "View `random` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT temp * random() AS random FROM home LIMIT 3 @@ -503,7 +503,7 @@ round(numeric_expression) {{% expand "View `round` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT round(temp) AS round FROM home LIMIT 3 @@ -537,7 +537,7 @@ signum(numeric_expression) {{% expand "View `signum` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT signum(temp - 23) AS signum FROM home LIMIT 3 @@ -569,7 +569,7 @@ sin(numeric_expression) {{% expand "View `sin` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT sin(temp) AS sin FROM home LIMIT 3 @@ -601,7 +601,7 @@ sqrt(numeric_expression) {{% expand "View `sqrt` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT sqrt(temp) AS sqrt FROM home LIMIT 3 @@ -633,7 +633,7 @@ tan(numeric_expression) {{% expand "View `tan` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT tan(temp) AS tan FROM home LIMIT 3 @@ -665,7 +665,7 @@ trunc(numeric_expression) {{% expand "View `trunc` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT trunc(temp) AS trunc FROM home LIMIT 3 diff --git a/content/influxdb/cloud-iox/reference/sql/functions/misc.md b/content/influxdb/cloud-dedicated/reference/sql/functions/misc.md similarity index 91% rename from content/influxdb/cloud-iox/reference/sql/functions/misc.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/misc.md index cd2603277..9c7818fea 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/misc.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/misc.md @@ -4,7 +4,7 @@ list_title: Miscellaneous functions description: > Use miscellaneous SQL functions to perform a variety of operations in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Miscellaneous parent: sql-functions weight: 310 @@ -37,7 +37,7 @@ arrow_cast(expression, datatype) {{% expand "View `arrow_cast` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -74,7 +74,7 @@ arrow_typeof(expression) {{% expand "View `arrow_typeof` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md b/content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md similarity index 90% rename from content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md index d99e627a3..fce2928e7 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/regular-expression.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/regular-expression.md @@ -4,11 +4,11 @@ list_title: Regular expression functions description: > Use regular expression functions to operate on data in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Regular expression parent: sql-functions weight: 308 -influxdb/cloud-iox/tags: [regular expressions, sql] +influxdb/cloud-dedicated/tags: [regular expressions, sql] --- The InfluxDB SQL implementation uses the POSIX regular expression syntax and @@ -39,7 +39,7 @@ regexp_match(str, regexp, flags) {{% expand "View `regexp_replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ {{% note %}} `regexp_match` returns a _list_ Arrow type, which is not supported by InfluxDB. @@ -87,7 +87,7 @@ regexp_replace(str, regexp, replacement, flags) {{% expand "View `regexp_replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/selector.md b/content/influxdb/cloud-dedicated/reference/sql/functions/selector.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/functions/selector.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/selector.md index d41082b54..855f18c17 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/selector.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/selector.md @@ -4,12 +4,12 @@ list_title: Selector functions description: > Select data with SQL selector functions. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Selector parent: sql-functions weight: 302 related: - - /influxdb/cloud-iox/query-data/sql/aggregate-select/ + - /influxdb/cloud-dedicated/query-data/sql/aggregate-select/ --- SQL selector functions are designed to work with time series data. diff --git a/content/influxdb/cloud-iox/reference/sql/functions/string.md b/content/influxdb/cloud-dedicated/reference/sql/functions/string.md similarity index 90% rename from content/influxdb/cloud-iox/reference/sql/functions/string.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/string.md index 329052b55..e3a7eb07d 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/string.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/string.md @@ -4,7 +4,7 @@ list_title: String functions description: > Use string functions to operate on string values in SQL queries. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: String parent: sql-functions weight: 307 @@ -50,7 +50,7 @@ Returns the ASCII value of the first character in a string. {{% note %}} `ascii` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -70,7 +70,7 @@ ascii(str) {{% expand "View `ascii` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -93,7 +93,7 @@ Returns the bit length of a string. {{% note %}} `bit_length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -113,7 +113,7 @@ bit_length(str) {{% expand "View `bit_length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -158,7 +158,7 @@ btrim(str[, trim_str]) {{% expand "View `btrim` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -205,7 +205,7 @@ concat(str[, ..., str_n]) {{% expand "View `concat` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -251,7 +251,7 @@ concat(separator, str[, ..., str_n]) {{% expand "View `concat_ws` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT @@ -378,7 +378,7 @@ left(str, n) {{% expand "View `left` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -401,7 +401,7 @@ Returns the number of characters in a string. {{% note %}} `char_length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -427,7 +427,7 @@ length(str) {{% expand "View `length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -466,7 +466,7 @@ lower(str) {{% expand "View `lower` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -508,7 +508,7 @@ lpad(str, n[, padding_str]) {{% expand "View `lpad` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -584,7 +584,7 @@ md5(str) {{% expand "View `md5` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -607,7 +607,7 @@ Returns the length of a string in bytes. {{% note %}} `length` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -628,7 +628,7 @@ octet_length(str) {{% expand "View `octet_length` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -703,7 +703,7 @@ replace(str, substr, replacement) {{% expand "View `replace` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -737,7 +737,7 @@ reverse(str) {{% expand "View `reverse` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -776,7 +776,7 @@ right(str, n) {{% expand "View `right` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -817,7 +817,7 @@ rpad(str, n[, padding_str]) {{% expand "View `rpad` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -933,7 +933,7 @@ starts_with(str, substr) {{% expand "View `starts_with` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -958,7 +958,7 @@ If the substring does not exist in the string, the function returns 0. {{% note %}} `strpos` returns a 32-bit integer. -To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-iox/query-data/sql/cast-types/#cast-to-an-integer). +To use with InfluxDB, [cast the return value to 64-bit integer](/influxdb/cloud-dedicated/query-data/sql/cast-types/#cast-to-an-integer). {{% /note %}} ```sql @@ -976,7 +976,7 @@ strpos(str, substr) {{% expand "View `strpos` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1015,7 +1015,7 @@ substr(str, start_pos[, length]) {{% expand "View `substr` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1050,7 +1050,7 @@ translate(str, chars, translation) {{% expand "View `translate` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT @@ -1167,7 +1167,7 @@ upper(str) {{% expand "View `upper` query example" %}} _The following example uses the sample data set provided in -[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ +[Get started with InfluxDB tutorial](/influxdb/cloud-dedicated/get-started/write/#construct-line-protocol)._ ```sql SELECT DISTINCT diff --git a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md b/content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md similarity index 96% rename from content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md rename to content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md index bc7e2ba93..5c76638ab 100644 --- a/content/influxdb/cloud-iox/reference/sql/functions/time-and-date.md +++ b/content/influxdb/cloud-dedicated/reference/sql/functions/time-and-date.md @@ -4,7 +4,7 @@ list_title: Time and date functions description: > Use time and date functions to work with time values and time series data. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: Time and date parent: sql-functions weight: 305 @@ -298,7 +298,7 @@ LIMIT 1 Converts a value to RFC3339 nanosecond timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 nanosecond timestamp. ```sql @@ -330,7 +330,7 @@ LIMIT 1 Converts a value to RFC3339 millisecond timestamp format (`YYYY-MM-DDT00:00:00.000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -365,7 +365,7 @@ Results Converts a value to RFC3339 microsecond timestamp format (`YYYY-MM-DDT00:00:00.000000Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -398,7 +398,7 @@ LIMIT 1 Converts a value to RFC3339 second timestamp format (`YYYY-MM-DDT00:00:00Z`). Supports timestamp, integer, and unsigned integer types as input. -Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Integers and unsigned integers are parsed as [Unix nanosecond timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and return the corresponding RFC3339 timestamp. ```sql @@ -432,7 +432,7 @@ LIMIT 1; ### from_unixtime Converts an integer to RFC3339 timestamp format (`YYYY-MM-DDT00:00:00.000000000Z`). -Input is parsed as a [Unix nanosecond timestamp](/influxdb/cloud-iox/reference/glossary/#unix-timestamp) +Input is parsed as a [Unix nanosecond timestamp](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) and returns the corresponding RFC3339 timestamp. ```sql diff --git a/content/influxdb/cloud-iox/reference/sql/group-by.md b/content/influxdb/cloud-dedicated/reference/sql/group-by.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/group-by.md rename to content/influxdb/cloud-dedicated/reference/sql/group-by.md index 7e75d420d..ad33c7295 100644 --- a/content/influxdb/cloud-iox/reference/sql/group-by.md +++ b/content/influxdb/cloud-dedicated/reference/sql/group-by.md @@ -3,7 +3,7 @@ title: GROUP BY clause description: > Use the `GROUP BY` clause to group query data by column values. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: GROUP BY clause parent: SQL reference weight: 203 diff --git a/content/influxdb/cloud-iox/reference/sql/having.md b/content/influxdb/cloud-dedicated/reference/sql/having.md similarity index 97% rename from content/influxdb/cloud-iox/reference/sql/having.md rename to content/influxdb/cloud-dedicated/reference/sql/having.md index 8500099f8..fe7363fff 100644 --- a/content/influxdb/cloud-iox/reference/sql/having.md +++ b/content/influxdb/cloud-dedicated/reference/sql/having.md @@ -4,7 +4,7 @@ description: > Use the `HAVING` clause to filter query results based on values returned from an aggregate operation. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: HAVING clause parent: SQL reference weight: 205 diff --git a/content/influxdb/cloud-iox/reference/sql/information-schema.md b/content/influxdb/cloud-dedicated/reference/sql/information-schema.md similarity index 94% rename from content/influxdb/cloud-iox/reference/sql/information-schema.md rename to content/influxdb/cloud-dedicated/reference/sql/information-schema.md index 6938251a5..3457859ff 100644 --- a/content/influxdb/cloud-iox/reference/sql/information-schema.md +++ b/content/influxdb/cloud-dedicated/reference/sql/information-schema.md @@ -4,7 +4,7 @@ description: > The `SHOW TABLES`, `SHOW COLUMNS`, and `SHOW ALL` commands return metadata related to your data schema. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: parent: SQL reference weight: 210 --- @@ -16,9 +16,9 @@ To access this information, use the `SHOW TABLES`, `SHOW COLUMNS`, and `SHOW ALL` commands or query views in the [ISO](https://www.iso.org/) SQL `information_schema` schema. -In the context of InfluxDB, a [measurement](/influxdb/cloud-iox/reference/glossary/#measurement) -is represented as a table. Time, [tags](/influxdb/cloud-iox/reference/glossary/#tag), -and [fields](/influxdb/cloud-iox/reference/glossary/#field) are each represented +In the context of InfluxDB, a [measurement](/influxdb/cloud-dedicated/reference/glossary/#measurement) +is represented as a table. Time, [tags](/influxdb/cloud-dedicated/reference/glossary/#tag), +and [fields](/influxdb/cloud-dedicated/reference/glossary/#field) are each represented by columns in a table. - [SHOW TABLES](#show-tables) diff --git a/content/influxdb/cloud-iox/reference/sql/limit.md b/content/influxdb/cloud-dedicated/reference/sql/limit.md similarity index 98% rename from content/influxdb/cloud-iox/reference/sql/limit.md rename to content/influxdb/cloud-dedicated/reference/sql/limit.md index bfdaee0f9..8ae057222 100644 --- a/content/influxdb/cloud-iox/reference/sql/limit.md +++ b/content/influxdb/cloud-dedicated/reference/sql/limit.md @@ -3,7 +3,7 @@ title: LIMIT clause description: > Use the `LIMIT` clause to limit the number of results returned by a query. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: LIMIT clause parent: SQL reference weight: 206 diff --git a/content/influxdb/cloud-iox/reference/sql/order-by.md b/content/influxdb/cloud-dedicated/reference/sql/order-by.md similarity index 97% rename from content/influxdb/cloud-iox/reference/sql/order-by.md rename to content/influxdb/cloud-dedicated/reference/sql/order-by.md index d02489b12..4251df4fc 100644 --- a/content/influxdb/cloud-iox/reference/sql/order-by.md +++ b/content/influxdb/cloud-dedicated/reference/sql/order-by.md @@ -4,7 +4,7 @@ list_title: ORDER BY clause description: > Use the `ORDER BY` clause to sort results by specified columns and order. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: ORDER BY clause parent: SQL reference weight: 204 @@ -94,3 +94,5 @@ first by `location` (1), and second by `water_level` (2). | coyote_creek | 2019-08-29T15:24:00.000Z | -0.571 | | coyote_creek | 2019-08-27T13:42:00.000Z | -0.561 | +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/influxdb/cloud-iox/reference/sql/select.md b/content/influxdb/cloud-dedicated/reference/sql/select.md similarity index 99% rename from content/influxdb/cloud-iox/reference/sql/select.md rename to content/influxdb/cloud-dedicated/reference/sql/select.md index 21a0dcfb3..2352bcd50 100644 --- a/content/influxdb/cloud-iox/reference/sql/select.md +++ b/content/influxdb/cloud-dedicated/reference/sql/select.md @@ -3,7 +3,7 @@ title: SELECT statement description: > Use the SQL `SELECT` statement to query data from a measurement. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: name: SELECT statement parent: SQL reference weight: 201 diff --git a/content/influxdb/cloud-iox/reference/sql/table-value-constructor.md b/content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md similarity index 96% rename from content/influxdb/cloud-iox/reference/sql/table-value-constructor.md rename to content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md index 797664566..f01f26250 100644 --- a/content/influxdb/cloud-iox/reference/sql/table-value-constructor.md +++ b/content/influxdb/cloud-dedicated/reference/sql/table-value-constructor.md @@ -4,7 +4,7 @@ description: > The table value constructor (TVC) uses the `VALUES` keyword to specify a set of row value expressions to construct into a table. menu: - influxdb_cloud_iox: + influxdb_cloud_dedicated: parent: SQL reference weight: 220 --- @@ -66,7 +66,7 @@ FROM + +- [InfluxDB data structure](#influxdb-data-structure) + - [Primary keys](#primary-keys) + - [Tags versus fields](#tags-versus-fields) +- [Schema restrictions](#schema-restrictions) + - [Do not use duplicate names for tags and fields](#do-not-use-duplicate-names-for-tags-and-fields) + - [Measurements can contain up to 200 columns](#measurements-can-contain-up-to-200-columns) +- [Design for performance](#design-for-performance) + - [Avoid wide schemas](#avoid-wide-schemas) + - [Avoid too many tags](#avoid-too-many-tags) + - [Avoid sparse schemas](#avoid-sparse-schemas) + - [Writing individual fields with different timestamps](#writing-individual-fields-with-different-timestamps) + - [Measurement schemas should be homogenous](#measurement-schemas-should-be-homogenous) +- [Design for query simplicity](#design-for-query-simplicity) + - [Keep measurement names, tag keys, and field keys simple](#keep-measurement-names-tag-keys-and-field-keys-simple) + - [Avoid keywords and special characters](#avoid-keywords-and-special-characters) + +## InfluxDB data structure + +The InfluxDB data model organizes time series data into buckets and measurements. +A bucket can contain multiple measurements. Measurements contain multiple +tags and fields. + +- **Bucket**: Named location where time series data is stored. + In the InfluxDB SQL implementation, a bucket is synonymous with a _database_. + A bucket can contain multiple _measurements_. + - **Measurement**: Logical grouping for time series data. + In the InfluxDB SQL implementation, a measurement is synonymous with a _table_. + All _points_ in a given measurement should have the same _tags_. + A measurement contains multiple _tags_ and _fields_. + - **Tags**: Key-value pairs that store metadata string values for each point--for example, + a value that identifies or differentiates the data source or context--for example, host, + location, station, etc. + - **Fields**: Key-value pairs that store data for each point--for example, + temperature, pressure, stock price, etc. + - **Timestamp**: Timestamp associated with the data. + When stored on disk and queried, all data is ordered by time. + In InfluxDB, a timestamp is a nanosecond-scale [unix timestamp](#unix-timestamp) in UTC. + +### Primary keys + +In time series data, the primary key for a row of data is typically a combination of timestamp and other attributes that uniquely identify each data point. +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-dedicated/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-dedicated/reference/glossary/#tag-value) on the point. + +### Tags versus fields + +When designing your schema for InfluxDB, a common question is, "what should be a +tag and what should be a field?" The following guidelines should help answer that +question as you design your schema. + +- Use tags to store identifying information about the source or context of the data. +- Use fields to store measured values. +- Tag values can only be strings. +- Field values can be any of the following data types: + - Integer + - Unsigned integer + - Float + - String + - Boolean + +{{% note %}} +The InfluxDB IOx engine supports infinite tag value and series cardinality. +Unlike InfluxDB backed by the TSM storage engine, **tag value** +cardinality doesn't affect the overall performance of your database. +{{% /note %}} + +--- + +## Schema restrictions + +### Do not use duplicate names for tags and fields + +Tags and fields within the same measurement can't be named the same. +All tags and fields are stored as unique columns in a table representing the +measurement on disk. +If you attempt to write a measurement that contains tags or fields with the same name, +the write fails due to a column conflict. + +### Measurements can contain up to 200 columns + +A measurement can contain **up to 200 columns**. Each row requires a time column, +but the rest represent tags and fields stored in the measurement. +Therefore, a measurement can contain one time column and 199 total field and tag columns. +If you attempt to write to a measurement and exceed the 200 column limit, the +write request fails and InfluxDB returns an error. + +--- + +## Design for performance + +How you structure your schema within a measurement can affect the overall +performance of queries against that measurement. +The following guidelines help to optimize query performance: + +- [Avoid wide schemas](#avoid-wide-schemas) +- [Avoid sparse schemas](#avoid-sparse-schemas) +- [Measurement schemas should be homogenous](#measurement-schemas-should-be-homogenous) + + +### Avoid wide schemas + +A wide schema is one with many tags and fields and corresponding columns for each. +With the InfluxDB IOx storage engine, wide schemas don't impact query execution performance. +Because IOx is a columnar database, it executes queries only against columns selected in the query. + +Although a wide schema won't affect query performance, it can lead to the following: + +- More resources required for persisting and compacting data during ingestion. +- Decreased sorting performance due to complex primary keys with [too many tags](#avoid-too-many-tags). + +The InfluxDB IOx storage engine has a +[limit of 200 columns per measurement](#measurements-can-contain-up-to-200-columns). + +To avoid a wide schema, limit the number of tags and fields stored in a measurement. +If you need to store more than 199 total tags and fields, consider segmenting +your fields into a separate measurement. + +#### Avoid too many tags + +In InfluxDB, the primary key for a row is the combination of the point's timestamp and _tag set_ - the collection of [tag keys](/influxdb/cloud-dedicated/reference/glossary/#tag-key) and [tag values](/influxdb/cloud-dedicated/reference/glossary/#tag-value) on the point. +A point that contains more tags has a more complex primary key, which could impact sorting performance if you sort using all parts of the key. + +### Avoid sparse schemas + +A sparse schema is one where, for many rows, columns contain null values. + + These generally stem from the following: +- [non-homogenous measurement schemas](#measurement-schemas-should-be-homogenous) +- [writing individual fields with different timestamps](#writing-individual-fields-with-different-timestamps) + +Sparse schemas require the InfluxDB query engine to evaluate many +null columns, adding unnecessary overhead to storing and querying data. + +_For an example of a sparse schema, +[view the non-homogenous schema example below](#view-example-of-a-sparse-non-homogenous-schema)._ + +#### Writing individual fields with different timestamps + +Reporting fields at different times with different timestamps creates distinct rows that contain null values--for example: + +You report `fieldA` with `tagset`, and then report `field B` with the same `tagset`, but with a different timestamp. +The result is two rows: one row has a _null_ value for **field A** and the other has a _null_ value for **field B**. + +In contrast, if you report fields at different times while using the same tagset and timestamp, the existing row is updated. +This requires slightly more resources at ingestion time, but then gets resolved at persistence time or compaction time +and avoids a sparse schema. + +### Measurement schemas should be homogenous + +Data stored within a measurement should be "homogenous," meaning each row should +have the same tag and field keys. +All rows stored in a measurement share the same columns, but if a point doesn't +include a value for a column, the column value is null. +A measurement full of null values has a ["sparse" schema](#avoid-sparse-schemas). + +{{< expand-wrapper >}} +{{% expand "View example of a sparse, non-homogenous schema" %}} + +Non-homogenous schemas are often caused by writing points to a measurement with +inconsistent tag or field sets. +In the following example, data is collected from two +different sources and each source returns data with different tag and field sets. + +{{< flex >}} +{{% flex-content %}} +##### Source 1 tags and fields: +- tags: + - source + - code + - crypto +- fields: + - price +{{% /flex-content %}} +{{% flex-content %}} +##### Source 2 tags and fields: +- tags: + - src + - currency + - crypto +- fields: + - cost + - volume +{{% /flex-content %}} +{{< /flex >}} + +These sets of data written to the same measurement will result in a measurement +full of null values (also known as a _sparse schema_): + +| time | source | src | code | currency | crypto | price | cost | volume | +| :------------------- | :----- | --: | :--- | :------- | :------ | ----------: | ---------: | ----------: | +| 2023-01-01T12:00:00Z | src1 | | USD | | bitcoin | 16588.45865 | | | +| 2023-01-01T12:00:00Z | | 2 | | EUR | bitcoin | | 16159.5806 | 16749450200 | +| 2023-01-01T13:00:00Z | src1 | | USD | | bitcoin | 16559.49871 | | | +| 2023-01-01T13:00:00Z | | 2 | | EUR | bitcoin | | 16131.3694 | 16829683245 | +| 2023-01-01T14:00:00Z | src1 | | USD | | bitcoin | 16577.46667 | | | +| 2023-01-01T14:00:00Z | | 2 | | EUR | bitcoin | | 16148.8727 | 17151722208 | +| 2023-01-01T15:00:00Z | src1 | | USD | | bitcoin | 16591.36998 | | | +| 2023-01-01T15:00:00Z | | 2 | | EUR | bitcoin | | 16162.4167 | 17311854919 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +## Design for query simplicity + +Naming conventions for measurements, tag keys, and field keys can simplify or +complicate the process of writing queries for your data. +The following guidelines help to ensure writing queries for your data is as +simple as possible. + +- [Keep measurement names, tag keys, and field keys simple](#keep-measurement-names-tag-keys-and-field-keys-simple) +- [Avoid keywords and special characters](#avoid-keywords-and-special-characters) + +### Keep measurement names, tag keys, and field keys simple + +Measurement names, tag keys, and field keys should be simple and accurately +describe what each contains. + +The most common cause of a complex naming convention is when you try to "embed" +data attributes into a measurement name, tag key, or field key. + +#### Not recommended {.orange} + +As a basic example, consider the following [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) +that embeds sensor metadata (location, model, and ID) into a tag key: + +``` +home,sensor=loc-kitchen.model-A612.id-1726ZA temp=72.1 +home,sensor=loc-bath.model-A612.id-2635YB temp=71.8 +``` + +{{< expand-wrapper >}} +{{% expand "View written data" %}} + +{{% influxql/table-meta %}} +**name**: home +{{% /influxql/table-meta %}} + +| time | sensor | temp | +| :------------------- | :------------------------------- | ---: | +| 2023-01-01T00:00:00Z | loc-kitchen.model-A612.id-1726ZA | 72.1 | +| 2023-01-01T00:00:00Z | loc-bath.model-A612.id-2635YB | 71.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +To query data from the sensor with ID `1726ZA`, you have to use either SQL pattern +matching or regular expressions to evaluate the `sensor` tag: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[SQL](#) +[InfluxQL](#) +[Flux](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor LIKE '%id-1726ZA%' +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor =~ /id-1726ZA/ +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```js +import "experimental/iox" + +iox.from(bucket: "example-bucket") + |> range(start: -1y) + |> filter(fn: (r) => r._measurement == "home") + |> filter(fn: (r) => r.sensor =~ /id-1726ZA/) +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +SQL pattern matching and regular expressions both complicate the query and +are less performant than simple equality expressions. + +#### Recommended {.green} + +The better approach would be to write each sensor attribute as an individual tag: + +``` +home,location=kitchen,sensor_model=A612,sensor_id=1726ZA temp=72.1 +home,location=bath,sensor_model=A612,sensor_id=2635YB temp=71.8 +``` + +{{< expand-wrapper >}} +{{% expand "View written data" %}} + +{{% influxql/table-meta %}} +**name**: home +{{% /influxql/table-meta %}} + +| time | location | sensor_model | sensor_id | temp | +| :------------------- | :------- | :----------- | :-------- | ---: | +| 2023-01-01T00:00:00Z | kitchen | A612 | 1726ZA | 72.1 | +| 2023-01-01T00:00:00Z | bath | A612 | 2635YB | 71.8 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +To query data from the sensor with ID `1726ZA` using this schema, you can use a +simple equality expression: + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[SQL & InfluxQL](#) +[Flux](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sql +SELECT * FROM home WHERE sensor_id = '1726ZA' +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```js +import "experimental/iox" + +iox.from(bucket: "example-bucket") + |> range(start: -1y) + |> filter(fn: (r) => r._measurement == "home") + |> filter(fn: (r) => r.sensor_id == "1726ZA") +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +This query is easier to write and is more performant than using pattern matching +or regular expressions. + +### Avoid keywords and special characters + +To simplify query writing, avoid using reserved keywords or special characters +in measurement names, tag keys, and field keys. + +- [SQL keywords](/influxdb/cloud-dedicated/reference/sql/#keywords) +- [InfluxQL keywords](/influxdb/cloud-dedicated/reference/syntax/influxql/spec/#keywords) + +When using SQL or InfluxQL to query measurements, tags, and fields with special +characters or keywords, you have to wrap these keys in **double quotes**. + +```sql +SELECT + "example-field", "tag@1-23" +FROM + "example-measurement" +WHERE + "tag@1-23" = 'ABC' +``` diff --git a/content/influxdb/cloud-dedicated/write-data/csv/_index.md b/content/influxdb/cloud-dedicated/write-data/csv/_index.md new file mode 100644 index 000000000..1908aab4e --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/csv/_index.md @@ -0,0 +1,18 @@ +--- +title: Write CSV data to InfluxDB Cloud Dedicated +description: > + Use Telegraf or the HTTP API to write CSV data + to InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + name: Write CSV data + parent: Write data +weight: 103 +related: + - /influxdb/cloud-dedicated/reference/syntax/line-protocol/ + - /influxdb/cloud-dedicated/reference/syntax/annotated-csv/ + - /influxdb/cloud-dedicated/reference/cli/influx/write/ +alt_engine: /influxdb/cloud/write-data/developer-tools/csv/ +--- + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md b/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md new file mode 100644 index 000000000..303734759 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/csv/telegraf.md @@ -0,0 +1,152 @@ +--- +title: Use Telegraf to write CSV data to InfluxDB Cloud Dedicated +description: > + Use the Telegraf `file` input plugin to read and parse CSV data into + [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) + and write it to InfluxDB. +menu: + influxdb_cloud_dedicated: + name: Use Telegraf + identifier: write-csv-telegraf + parent: Write CSV data +weight: 203 +related: + - /{{< latest "telegraf" >}}/data_formats/input/csv/ + - /influxdb/cloud-dedicated/write-data/use-telegraf/ +--- + +Use the Telegraf `file` input plugin to read and parse CSV data into +[line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) +and write it to InfluxDB. +[Telegraf](/{{< latest "telegraf" >}}/) is a plugin-based agent that collects +metrics from different sources and writes them to specified destinations. + + + +- [Configure Telegraf to read CSV files](#configure-telegraf-to-read-csv-files) +- [Configure Telegraf to write to InfluxDB](#configure-telegraf-to-write-to-influxdb) + - [Other Telegraf configuration options](#other-telegraf-configuration-options) + + + +## Configure Telegraf to read CSV files + +1. Add and enable the [`inputs.file` plugin](/{{< latest "telegraf" >}}/plugins/#input-file) + in your Telegraf configuration file. +2. Use the `files` option to specify the list of CSV files to read. + CSV files must be accessible by the Telegraf agent. +3. Set the `data_format` option to `csv`. +4. Define all other `csv_` configuration options specific to the CSV data you + want to write to InfluxDB. + _For detailed information about each of the CSV format configuration options, + see [CSV input data format](/{{< latest "telegraf" >}}/data_formats/input/csv/)._ + +```toml +[[inputs.file]] + files = ["/path/to/example.csv"] + data_format = "csv" + csv_header_row_count = 0 + csv_column_names = [] + csv_column_types = [] + csv_skip_rows = 0 + csv_metadata_rows = 0 + csv_metadata_separators = [":", "="] + csv_metadata_trim_set = "" + csv_skip_columns = 0 + csv_delimiter = "," + csv_comment = "" + csv_trim_space = false + csv_tag_columns = [] + csv_measurement_column = "" + csv_timestamp_column = "" + csv_timestamp_format = "" + csv_timezone = "" + csv_skip_values = [] + csv_skip_errors = false + csv_reset_mode = "none" +``` + +## Configure Telegraf to write to InfluxDB + +1. Add and enable the [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) + plugin in your Telegraf configuration file. +2. Include the following options: + + - **url**: a list containing your Influx Cloud Dedicated cluster URL using the HTTPS + protocol: + + ``` + https://cluster-id.influxdb.io + ``` + - **token**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database. + - **organization**: an empty string (`''`) (InfluxDB Cloud Dedicated ignores this parameter). + - **bucket**: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write to. + +The following example shows a minimal [`outputs.influxdb_v2`](/{{< latest "telegraf" >}}/plugins/#output-influxdb_v2) configuration for writing data to InfluxDB Cloud Dedicated: + +```toml +[[outputs.influxdb_v2]] + urls = ["https://cluster-id.influxdb.io"] + token = "DATABASE_TOKEN" + organization = "" + bucket = "DATABASE_NAME" +``` + +Replace the following: + +- **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database +- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + +{{< expand-wrapper >}} +{{% expand "View full example Telegraf configuration file" %}} + +In the following example: + +- **`$INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/cloud-dedicated/admin/tokens/) value. +- **`DATABASE_NAME`** is the InfluxDB Cloud Dedicated database to write to. + +```toml +[[inputs.file]] + files = ["/path/to/example.csv"] + data_format = "csv" + csv_header_row_count = 0 + csv_column_names = [] + csv_column_types = [] + csv_skip_rows = 0 + csv_metadata_rows = 0 + csv_metadata_separators = [":", "="] + csv_metadata_trim_set = "" + csv_skip_columns = 0 + csv_delimiter = "," + csv_comment = "" + csv_trim_space = false + csv_tag_columns = [] + csv_measurement_column = "" + csv_timestamp_column = "" + csv_timestamp_format = "" + csv_timezone = "" + csv_skip_values = [] + csv_skip_errors = false + csv_reset_mode = "none" + +[[outputs.influxdb_v2]] + urls = ["https://cluster-id.influxdb.io"] + token = "$INFLUX_TOKEN" + organization = "" + bucket = "DATABASE_NAME" + content_encoding = "gzip" +``` + +{{% /expand %}} +{{< /expand-wrapper >}} + +**Restart the Telegraf agent** to apply the configuration change and write the CSV +data to InfluxDB. + +#### Other Telegraf configuration options + +The preceding examples describe Telegraf configurations necessary for writing to InfluxDB Cloud Dedicated. +The output plugin provides several other options for configuring the Telegraf client: + +- `influx_uint_support`: supported by the InfluxDB IOx storage engine. +- See [`influxdb_v2` plugin options](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) on GitHub. diff --git a/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md b/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md new file mode 100644 index 000000000..94db6c7f4 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/migrate-data/_index.md @@ -0,0 +1,74 @@ +--- +title: Migrate data to InfluxDB Cloud Dedicated +description: > + Migrate data from InfluxDB powered by TSM (OSS, Enterprise, or Cloud) to + InfluxDB Cloud Dedicated. +menu: + influxdb_cloud_dedicated: + name: Migrate data + parent: Write data +weight: 104 +alt_engine: /influxdb/cloud/migrate-data/ +--- + +Migrate data to InfluxDB Cloud Dedicated powered by InfluxDB IOx from other +InfluxDB instances powered by TSM including InfluxDB OSS 1.x, 2.x, +InfluxDB Enterprise, and InfluxDB Cloud (TSM). + +- [Should you migrate?](#should-you-migrate) + - [Are you currently limited by series cardinality?](#are-you-currently-limited-by-series-cardinality) + - [Do you want to use SQL to query your data?](#do-you-want-to-use-sql-to-query-your-data) + - [Do you want better InfluxQL performance?](#do-you-want-better-influxql-performance) + - [Do you depend on a specific cloud provider or region?](#do-you-depend-on-a-specific-cloud-provider-or-region) + - [Are you reliant on Flux queries and Flux tasks?](#are-you-reliant-on-flux-queries-and-flux-tasks) +- [Data migration guides](#data-migration-guides) + +## Should you migrate? + +There are important things to consider with migrating to InfluxDB Cloud Dedicated. +The following questions will help guide your decision to migrate. + +#### Are you currently limited by series cardinality? + +**Yes, you should migrate**. Series cardinality is a major limiting factor with +the InfluxDB TSM storage engine. The more unique series in your data, the less +performant your database. +The IOx storage engine supports near limitless series cardinality and is, without +question, the better solution for high series cardinality workloads. + +#### Do you want to use SQL to query your data? + +**Yes, you should migrate**. InfluxDB Cloud Dedicated lets you query your time +series data with SQL. For more information about querying your data with SQL, see: + +- [Query data with SQL](/influxdb/cloud-dedicated/query-data/sql/) +- [InfluxDB SQL reference](/influxdb/cloud-dedicated/reference/sql/) + +#### Do you want better InfluxQL performance? + +**Yes, you should migrate**. One of the primary goals when designing the InfluxDB +IOx storage engine was to enable performant implementations of both SQL and InfluxQL. +When compared to querying InfluxDB powered by TSM (InfluxDB OSS 1.x, 2.x, and Enterprise), +InfluxQL queries are more performant when querying InfluxDB powered by InfluxDB IOx. + +#### Do you depend on a specific cloud provider or region? + +**You should maybe migrate**. InfluxDB Cloud Dedicated instances are available +from the following providers: + +{{< cloud_regions type=iox-list >}} + +If your deployment requires other cloud providers or regions, you may need to +wait until the IOx storage engine is available in a region that meets your requirements. +We are currently working to make InfluxDB IOx available on more providers and +in more regions around the world. + +#### Are you reliant on Flux queries and Flux tasks? + +**You should not migrate**. InfluxDB Cloud Dedicated does not support Flux. + +--- + +## Data migration guides + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md b/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md new file mode 100644 index 000000000..0d4803381 --- /dev/null +++ b/content/influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-cloud-dedicated.md @@ -0,0 +1,238 @@ +--- +title: Migrate data from InfluxDB 1.x to InfluxDB Cloud Dedicated +description: > + To migrate data from a TSM-powered InfluxDB 1.x (OSS or Enterprise) to an + InfluxDB Cloud Dedicated cluster, export the data as line protocol and + write the exported data to your InfluxDB Cloud Dedicated database. +menu: + influxdb_cloud_dedicated: + name: Migrate from 1.x to Dedicated + parent: Migrate data +weight: 103 +aliases: + - /influxdb/cloud-dedicated/write-data/migrate-data/migrate-1x-to-iox/ +related: + - /influxdb/cloud-dedicated/admin/databases/ + - /influxdb/cloud-dedicated/admin/tokens/ + - /influxdb/cloud-dedicated/primers/api/v1/ + - /influxdb/cloud-dedicated/primers/api/v2/ +--- + +To migrate data from an InfluxDB 1.x OSS or Enterprise instance to InfluxDB Cloud +Dedicated, export the data as line protocol and write +the exported data to an InfluxDB Cloud Dedicated database. + +## Tools to use +The migration process uses the following tools: + +- **`influx_inspect` utility**: + The [`influx_inspect` utility](/{{< latest "influxdb" "v1" >}}/tools/influx_inspect/#export) + is packaged with InfluxDB 1.x OSS and Enterprise. +- **[`influxctl` admin CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/)**. +- [v1 API `/write` endpoint](/influxdb/cloud-dedicated/primers/api/v1/) or [v2 API `/api/v2/write` endpoint](/influxdb/cloud-dedicated/primers/api/v2/) and API client libraries. + + +## Migrate data + +1. **Export data from your InfluxDB 1.x instance as line protocol.** + + Use the **InfluxDB 1.x `influx_inspect export` utility** to export data as + line protocol and store it in a file. + Include the following: + + - ({{< req "Required" >}}) `-lponly` flag to export line protocol without InfluxQL DDL or DML. + - ({{< req "Required" >}}) `-out` flag with a path to an output file. + Default is `~/.influxdb/export`. _Any subsequent export commands without + the output file defined will overwrite the existing export file._ + - `-compress` flag to use gzip to compress the output. + - `-datadir` flag with the path to your InfluxDB 1.x `data` directory. + Only required if the `data` directory is at a non-default location. + For information about default locations, see + [InfluxDB OSS 1.x file system layout](/{{< latest "influxdb" "v1" >}}/concepts/file-system-layout/#file-system-layout) + or [InfluxDB Enterprise 1.x file system layout](/{{< latest "enterprise_influxdb" >}}/concepts/file-system-layout/#file-system-layout). + - `-waldir` flag with the path to your InfluxDB 1.x `wal` directory. + Only required if the `wal` directory is at a non-default location. + For information about default locations, see + [InfluxDB OSS 1.x file system layout](/{{< latest "influxdb" "v1" >}}/concepts/file-system-layout/#file-system-layout) + or [InfluxDB Enterprise 1.x file system layout](/{{< latest "enterprise_influxdb" >}}/concepts/file-system-layout/#file-system-layout). + - `-database` flag with a specific database name to export. + By default, all databases are exported. + - `-retention` flag with a specific retention policy to export. + By default, all retention policies are exported. + - `-start` flag with an RFC3339 timestamp that defines the earliest time to export. + Default is `1677-09-20T16:27:54-07:44`. + - `-end` flag with an RFC3339 timestamp that defines the latest time to export. + Default is `2262-04-11T16:47:16-07:00`. + + {{% note %}} +We recommend exporting each database and retention policy combination separately +to easily write the exported data into corresponding InfluxDB Cloud Dedicated +databases. + {{% /note %}} + + ##### Export all data in a database and retention policy to a file + ```sh + influx_inspect export \ + -lponly \ + -database example-db \ + -retention example-rp \ + -out path/to/export-file.lp + ``` + + ##### View more export command examples: + {{< expand-wrapper >}} +{{% expand "Export all data to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -out path/to/export-file.lp.gzip +``` + +{{% /expand %}} + +{{% expand "Export all data to a compressed file" %}} + +```sh +influx_inspect export \ + -lponly \ + -compress \ + -out path/to/export-file.lp.gzip +``` + +{{% /expand %}} + +{{% expand "Export data within time bounds to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -start 2020-01-01T00:00:00Z \ + -end 2023-01-01T00:00:00Z \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export a database and all its retention policies to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -database example-db \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export a specific database and retention policy to a file" %}} + +```sh +influx_inspect export \ + -lponly \ + -database example-db \ + -retention example-rp \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + +{{% expand "Export all data from _non-default_ `data` and `wal` directories" %}} + +```sh +influx_inspect export \ + -lponly \ + -datadir path/to/influxdb/data/ \ + -waldir path/to/influxdb/wal/ \ + -out path/to/export-file.lp +``` + +{{% /expand %}} + {{< /expand-wrapper >}} + +2. Create InfluxDB Cloud Dedicated databases for each InfluxDB 1.x database and retention policy combination. + + {{% note %}} +**If coming from InfluxDB v1**, the concepts of databases and retention policies +have been combined into a single concept--database. Retention policies are no +longer part of the InfluxDB data model. However, InfluxDB Cloud Dedicated does +support InfluxQL, which requires databases and retention policies. +See [InfluxQL DBRP naming convention](/influxdb/cloud-dedicated/admin/databases/create/#influxql-dbrp-naming-convention). + +**If coming from InfluxDB v2 or InfluxDB Cloud**, _database_ and _bucket_ are synonymous. + {{% /note %}} + + {{< expand-wrapper >}} +{{% expand "View example 1.x databases and retention policies as InfluxDB Cloud Dedicated databases" %}} +If you have the following InfluxDB 1.x data structure: + +- example-db _(database)_ + - autogen _(retention policy)_ + - historical-1mo _(retention policy)_ + - historical-6mo _(retention policy)_ + - historical-1y _(retention policy)_ + +You would create the following InfluxDB {{< current-version >}} databases: + +- example-db/autogen +- example-db/historical-1mo +- example-db/historical-6mo +- example-db/historical-1y + +{{% /expand %}} + {{< /expand-wrapper >}} + + Use the [`influxctl database create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/database/create/) + to [create a database](/influxdb/cloud-dedicated/admin/databases/create/) in your InfluxDB Cloud Dedicated cluster. + + Provide the following arguments: + + - _(Optional)_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods) + (default is infinite) + - Database name _(see [Database naming restrictions](#database-naming-restrictions))_ + + ```sh + influxctl database create --retention-period 30dInner join
+ {{< svg svg="static/svgs/join-diagram.svg" class="inner small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +Left outer join
+ {{< svg svg="static/svgs/join-diagram.svg" class="left small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +Right outer join
+ {{< svg svg="static/svgs/join-diagram.svg" class="right small center" >}} +{{< /flex-content >}} +{{< flex-content "quarter" >}} +Full outer join
+ {{< svg svg="static/svgs/join-diagram.svg" class="full small center" >}} +{{< /flex-content >}} +{{< /flex >}} + +The `INNER JOIN` clause gathers data where there is a match between the two measurements being joined. + +```sql +SELECT + * +FROM + h2o_feet + INNER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `LEFT JOIN` and `LEFT OUTER JOIN` clauses gather data from all rows in the left table regardless of whether there is a match in the right table. + +```sql +SELECT + * +FROM + h2o_feet + LEFT OUTER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `RIGHT JOIN` and `RIGHT OUTER JOIN` clauses gather data from all rows in the right table regardless of whether there is a match in the left table + +```sql +SELECT + * +FROM + h2o_feet + RIGHT OUTER JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +The `FULL JOIN` and `FULL OUTER JOIN` clauses return all rows from the left and the right side of the join with `NULL` values where there is no match. + +```sql +SELECT + * +FROM + h2o_feet + FULL JOIN h2o_temperature ON h2o_feet.location = h2o_temperature.location + AND h2o_feet.time = h2o_temperature.time +``` + +### GROUP BY clause + +Use the `GROUP BY` clause to group query results based on specified column values. `GROUP BY` **requires** an aggregate or selector function in the `SELECT` statement. + +#### Examples + +```sql +SELECT + MEAN("water_level"), + "location" +FROM + "h2o_feet" +GROUP BY + "location" +``` + +### HAVING clause + + Use the `HAVING` clause to filter query results based on a specified condition. + The `HAVING` clause must _follow_ the `GROUP BY` clause, but _precede_ the `ORDER BY` clause. + +#### Examples + +```sql +SELECT + MEAN("water_level"), + "location" +FROM + "h2o_feet" +GROUP BY + "location" +HAVING + MEAN("water_level") > 4 +ORDER BY + "location" +``` + +### UNION clause + +The `UNION` clause combines the results of two or more `SELECT` statements without returning any duplicate rows. `UNION ALL` returns all results, including duplicates. + +#### Examples + +```sql +SELECT + 'pH' +FROM + "h2o_pH" +UNION ALL +SELECT + "location" +FROM + "h2o_quality" +``` + +### ORDER BY clause + +The `ORDER BY` clause orders results by specified columns and order. +Sort data based on fields, tags, and timestamps. +The following orders are supported: + +- `ASC`: ascending _(default)_ +- `DESC`: descending + +#### Examples + +```sql +SELECT + "water_level", + "location" +FROM + "h2o_feet" +ORDER BY + "location", + "time" DESC +``` + +### LIMIT clause + +The `LIMIT` clause limits the number of rows to return. +The defined limit should be a non-negative integer. + +#### Examples + +```sql +SELECT + "water_level", + "location" +FROM + "h2o_feet" +LIMIT + 10 +``` + +### WITH clause + +The `WITH` clause provides a way to write auxiliary statements for use in a larger query. +It can help break down large, complicated queries into simpler forms. + +```sql +WITH summary_data as +(SELECT degrees, location, time + FROM average_temperature) +SELECT * FROM summary_data +``` + +### OVER clause + +The `OVER` clause is used with SQL window functions. +A **window function** performs a calculation across a set of table rows that are related in some way to the current row. + While similar to aggregate functions, window functions output results into rows retaining their separate identities. + +```sql +SELECT + time, + water_level +FROM + ( + SELECT + time, + "water_level", + row_number() OVER ( + order by + water_level desc + ) as rn + FROM + h2o_feet + ) +WHERE + rn <= 3; +``` + +## Comments + +Use comments to describe and add detail or notes to your queries. + +- Single line comments use the double hyphen `--` symbol. Single line comments end with a line break. +- Multi-line comments begin with `/*` and end with ` */`. + +```sql +-- Single-line comment + +/* + * Multi-line comment + */ +``` + +## Schema information + +InfluxDB Cloud Serverless supports the following metedata schema queries: + +```sql +SHOW tables + +SHOW columns FROMThe time series platform
- -View the InfluxDB documentation
- +The time series platform
+The open source time series platform designed to store, query, and process time series data.
+Highly available InfluxDB built for high write and query workloads.
+ +Managed InfluxDB powered by the InfluxDB TSM storage engine deployed in the cloud.
+ +Managed InfluxDB powered by the InfluxDB IOx storage engine deployed in the cloud.
+ +Managed InfluxDB powered by the InfluxDB IOx storage engine deployed in the cloud and dedicated to your workload.
+Build your application using the InfluxDB Cloud and InfluxDB OSS APIs.
+Build your application using the InfluxDB Cloud and InfluxDB OSS v2 APIs.
You are currently viewing documentation specific to InfluxDB Cloud + {{ if $isIOx }}Serverless{{ end }} powered by the {{ $engine }} storage engine, which - offers different functionality than InfluxDB Cloud powered by the - {{ $altEngine }} storage engine. + offers different functionality than InfluxDB Cloud + {{ if not $isIOx }}Serverless{{ end }} + powered by the {{ $altEngine }} storage engine.
Are you using the {{ $engine }} storage engine? diff --git a/layouts/partials/footer/javascript.html b/layouts/partials/footer/javascript.html index 7c70c9a7a..3da6500c8 100644 --- a/layouts/partials/footer/javascript.html +++ b/layouts/partials/footer/javascript.html @@ -65,7 +65,7 @@ {{ end }} - -{{ if in (slice "cloud" "cloud-iox") (index (findRE "[^/]+.*?" .Page.RelPermalink) 1) }} + +{{ if in (slice "cloud" "cloud-serverless") (index (findRE "[^/]+.*?" .Page.RelPermalink) 1) }} {{ end }} diff --git a/layouts/partials/footer/modals/influxdb-url.html b/layouts/partials/footer/modals/influxdb-url.html index 3c10477fe..46088b8be 100644 --- a/layouts/partials/footer/modals/influxdb-url.html +++ b/layouts/partials/footer/modals/influxdb-url.html @@ -5,7 +5,8 @@ {{ $EnterpriseLink := print "/enterprise_influxdb/" $latestEnterpriseVersion "/administration/config-data-nodes/#http-endpoint-settings" }} {{ $isInfluxDB := cond (gt (len (findRE `^/influxdb/|^/enterprise_influxdb/` .RelPermalink)) 0) true false }} {{ $isOSS := cond (in .RelPermalink "/influxdb/v") true false }} -{{ $isCloud := cond (in .RelPermalink "/influxdb/cloud") true false }} +{{ $isCloud := cond (or (in .RelPermalink "/influxdb/cloud/") (in .RelPermalink "/influxdb/cloud-serverless/")) true false }} +{{ $isDedicated := cond (in .RelPermalink "/influxdb/cloud-dedicated/") true false }} {{ $isEnterprise := cond (in .RelPermalink "/enterprise_influxdb/") true false }} {{ .Scratch.Set "modalTitle" "Where are you running InfluxDB?" }} @@ -13,6 +14,8 @@ {{ .Scratch.Set "modalTitle" "What is your InfluxDB OSS URL?"}} {{ else if $isCloud }} {{ .Scratch.Set "modalTitle" "Select your InfluxDB Cloud region" }} +{{ else if $isDedicated }} + {{ .Scratch.Set "modalTitle" "What is your InfluxDB Cloud Dedicated cluster URL?" }} {{ end }} {{ .Scratch.Set "modalMessage" "Select your **InfluxDB Cloud region and cluster** or your **InfluxDB OSS URL** and we'll customize code examples for you. _[Identify your InfluxDB Cloud cluster](/influxdb/cloud/reference/regions/#regions-with-multiple-clusters)_." }} @@ -22,6 +25,8 @@ {{ .Scratch.Set "modalMessage" "Customize your **InfluxDB Enterprise URL** and we'll update code examples for you." }} {{ else if $isCloud }} {{ .Scratch.Set "modalMessage" "Select your **InfluxDB Cloud region and cluster** and we'll customize code examples for you. _[Identify your InfluxDB Cloud cluster](/influxdb/cloud/reference/regions/#regions-with-multiple-clusters)_." }} +{{ else if $isDedicated }} + {{ .Scratch.Set "modalMessage" "Enter your **InfluxDB Cloud Dedicated cluster URL** and we'll update code examples for you." }} {{ end }} {{ .Scratch.Set "modalRefLinks" (print "[InfluxDB Cloud regions](" $CloudLink ") or [InfluxDB OSS URLs](" $OSSLink ")") }} @@ -96,6 +101,23 @@
For more information, see {{ $modalRefLinks | markdownify }}.
+ {{ if not $isDedicated }}For more information, see {{ $modalRefLinks | markdownify }}.
{{ end }}