From 38c33657fc9574c4159dd660833e00659a13588a Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Thu, 13 Jul 2023 17:41:07 -0500 Subject: [PATCH] Fix csv examples (#5022) * fix: comma use in annotated CSV examples (#5017) * fix: comma use in annotated CSV examples (#5017) * fix: comma use in annotated CSV examples (#5017) * fix: typo * fix: comma use in annotated CSV examples (#5017) * fix: comma use in annotated CSV examples (#5017) --- .../reference/syntax/annotated-csv/_index.md | 23 +++++++++-------- .../v2.0/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.1/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.2/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.3/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.4/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.5/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.6/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 13 ++++++---- .../v2.7/reference/cli/influx/write/_index.md | 2 +- .../reference/syntax/annotated-csv/_index.md | 25 +++++++++++-------- 17 files changed, 90 insertions(+), 65 deletions(-) diff --git a/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md index e6a36b227..15b0a31d3 100644 --- a/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/cloud-serverless/reference/syntax/annotated-csv/_index.md @@ -49,10 +49,11 @@ A table may have the following rows and columns. In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -163,9 +164,9 @@ Time column values should be **Unix nanosecond timestamps**, **RFC3339**, or **R ##### Example line protocol elements in datatype annotation ``` -#group,false,false,false,false,false,false,false -#datatype,measurement,tag,tag,field,field,ignored,time -#default,,,,,,, +#group false,false,false,false,false,false,false +#datatype measurement,tag,tag,field,field,ignored,time +#default ,,,,,, m,cpu,host,time_steal,usage_user,nothing,time cpu,cpu1,host1,0,2.7,a,1482669077000000000 cpu,cpu1,host2,0,2.2,b,1482669087000000000 @@ -178,15 +179,15 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #group,false,false,false,false,false,false,false,false,false #datatype,measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default,test,annotatedDatatypes,,,,,, -m,name,s,d,b,l,ul,dur,time -,,str1,1.0,true,1,1,1ms,1 -,,str2,2.0,false,2,2,2us,2020-01-11T10:10:10Z +,m,name,s,d,b,l,ul,dur,time +,,,str1,1.0,true,1,1,1ms,1 +,,,str2,2.0,false,2,2,2us,2020-01-11T10:10:10Z ``` Resulting line protocol: diff --git a/content/influxdb/v2.0/reference/cli/influx/write/_index.md b/content/influxdb/v2.0/reference/cli/influx/write/_index.md index a6b0e1ec1..fbceaea62 100644 --- a/content/influxdb/v2.0/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.0/reference/cli/influx/write/_index.md @@ -207,7 +207,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.0/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.0/reference/syntax/annotated-csv/_index.md index 1593b5029..fa705f1b5 100644 --- a/content/influxdb/v2.0/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.0/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.0/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.1/reference/cli/influx/write/_index.md b/content/influxdb/v2.1/reference/cli/influx/write/_index.md index 55d995dbc..8382f4a7f 100644 --- a/content/influxdb/v2.1/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.1/reference/cli/influx/write/_index.md @@ -209,7 +209,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.1/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.1/reference/syntax/annotated-csv/_index.md index d51e114b7..32482ac5e 100644 --- a/content/influxdb/v2.1/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.1/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.1/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.2/reference/cli/influx/write/_index.md b/content/influxdb/v2.2/reference/cli/influx/write/_index.md index b493db54c..45ffd6cfc 100644 --- a/content/influxdb/v2.2/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.2/reference/cli/influx/write/_index.md @@ -209,7 +209,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.2/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.2/reference/syntax/annotated-csv/_index.md index 3db0c7496..125adbf1a 100644 --- a/content/influxdb/v2.2/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.2/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.2/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.3/reference/cli/influx/write/_index.md b/content/influxdb/v2.3/reference/cli/influx/write/_index.md index 156420435..24dd587f4 100644 --- a/content/influxdb/v2.3/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.3/reference/cli/influx/write/_index.md @@ -209,7 +209,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.3/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.3/reference/syntax/annotated-csv/_index.md index a89a5e707..90e9187e6 100644 --- a/content/influxdb/v2.3/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.3/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.3/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.4/reference/cli/influx/write/_index.md b/content/influxdb/v2.4/reference/cli/influx/write/_index.md index 889a4d5bc..3dcfae34c 100644 --- a/content/influxdb/v2.4/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.4/reference/cli/influx/write/_index.md @@ -207,7 +207,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.4/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.4/reference/syntax/annotated-csv/_index.md index 945e1c8ab..9406bb9ca 100644 --- a/content/influxdb/v2.4/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.4/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.4/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.5/reference/cli/influx/write/_index.md b/content/influxdb/v2.5/reference/cli/influx/write/_index.md index 40f5a5760..cb0bcb6d5 100644 --- a/content/influxdb/v2.5/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.5/reference/cli/influx/write/_index.md @@ -207,7 +207,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.5/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.5/reference/syntax/annotated-csv/_index.md index 48f1f1003..b913fee0e 100644 --- a/content/influxdb/v2.5/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.5/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.5/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.6/reference/cli/influx/write/_index.md b/content/influxdb/v2.6/reference/cli/influx/write/_index.md index bfceab41e..63e0dfae1 100644 --- a/content/influxdb/v2.6/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.6/reference/cli/influx/write/_index.md @@ -207,7 +207,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.6/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.6/reference/syntax/annotated-csv/_index.md index af31df6d4..83adf49b1 100644 --- a/content/influxdb/v2.6/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.6/reference/syntax/annotated-csv/_index.md @@ -79,10 +79,11 @@ my-result,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east, In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. @@ -162,6 +163,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.6/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -228,7 +231,7 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #datatype measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default test,annotatedDatatypes,,,,,, diff --git a/content/influxdb/v2.7/reference/cli/influx/write/_index.md b/content/influxdb/v2.7/reference/cli/influx/write/_index.md index a1bc49dc8..c8f0ade33 100644 --- a/content/influxdb/v2.7/reference/cli/influx/write/_index.md +++ b/content/influxdb/v2.7/reference/cli/influx/write/_index.md @@ -207,7 +207,7 @@ influx write \ --bucket example-bucket \ --format csv \ "#constant measurement,sensorData -#datatype,datetime:RFC3339,double +#datatype dateTime:RFC3339,double time,temperature 2020-12-18T18:16:11Z,72.7 2020-12-18T18:16:21Z,73.8 diff --git a/content/influxdb/v2.7/reference/syntax/annotated-csv/_index.md b/content/influxdb/v2.7/reference/syntax/annotated-csv/_index.md index bb73d1d1c..a421b4abf 100644 --- a/content/influxdb/v2.7/reference/syntax/annotated-csv/_index.md +++ b/content/influxdb/v2.7/reference/syntax/annotated-csv/_index.md @@ -52,10 +52,11 @@ A table may have the following rows and columns. In addition to the data columns, a table may include the following columns: -- **Annotation column**: Only used in annotation rows. Always the first column. - Displays the name of an annotation. Value can be empty or a supported [annotation](#annotations). - You'll notice a space for this column for the entire length of the table, - so rows appear to start with `,`. +- **Annotation column**: Displays the name of an annotation. + Only used in annotation rows and is always the first column. + Value can be empty or a supported [annotation](#annotations). + The response format uses a comma (`,`) to separate an annotation name from values in the row. + To account for this, rows in the table start with a leading comma; you'll notice an empty column for the entire length of the table. - **Result column**: Contains the name of the result specified by the query. - **Table column**: Contains a unique ID for each table in a result. @@ -115,6 +116,8 @@ Subsequent columns contain annotation values as shown in the table below. | **default** | a value of the column's data type | Value to use for rows with an empty value. | +Some tools might use or require a comma (`,`) to separate the annotation name from values in an annotation row. + {{% note %}} To encode a table with its [group key](/influxdb/v2.7/reference/glossary/#group-key), the `datatype`, `group`, and `default` annotations must be included. @@ -171,9 +174,9 @@ Time column values should be **Unix nanosecond timestamps**, **RFC3339**, or **R ##### Example line protocol elements in datatype annotation ``` -#group,false,false,false,false,false,false,false -#datatype,measurement,tag,tag,field,field,ignored,time -#default,,,,,,, +#group false,false,false,false,false,false,false +#datatype measurement,tag,tag,field,field,ignored,time +#default ,,,,,, m,cpu,host,time_steal,usage_user,nothing,time cpu,cpu1,host1,0,2.7,a,1482669077000000000 cpu,cpu1,host2,0,2.2,b,1482669087000000000 @@ -186,15 +189,15 @@ cpu,cpu=cpu1,host=host1 time_steal=0,usage_user=2.7 1482669077000000000 cpu,cpu=cpu1,host=host2 time_steal=0,usage_user=2.2 1482669087000000000 ``` -##### Example of mixing data types line protocol elements +##### Example of mixing data types and line protocol elements ``` #group,false,false,false,false,false,false,false,false,false #datatype,measurement,tag,string,double,boolean,long,unsignedLong,duration,dateTime #default,test,annotatedDatatypes,,,,,, -m,name,s,d,b,l,ul,dur,time -,,str1,1.0,true,1,1,1ms,1 -,,str2,2.0,false,2,2,2us,2020-01-11T10:10:10Z +,m,name,s,d,b,l,ul,dur,time +,,,str1,1.0,true,1,1,1ms,1 +,,,str2,2.0,false,2,2,2us,2020-01-11T10:10:10Z ``` Resulting line protocol: