Skip to content

Commit 568883b

Browse files
committed
fix(influxdb3): Get-started write data: headings, link, and sample code
1 parent 6caffd5 commit 568883b

File tree

1 file changed

+9
-6
lines changed
  • content/shared/influxdb3-get-started

1 file changed

+9
-6
lines changed

content/shared/influxdb3-get-started/write.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
139139

140140
{{% /influxdb/custom-timestamps %}}
141141

142-
## Write data using the CLI
142+
## Write data using the CLI
143143

144144
To quickly get started writing data, use the
145145
[`influxdb3 write` command](/influxdb3/version/reference/clis/influxdb3/write/).
@@ -148,13 +148,16 @@ Include the following:
148148
- `--database` option that identifies the target database
149149
- `--token` option that specifies the token to use _(unless the `INFLUXDB3_AUTH_TOKEN`
150150
environment variable is already set)_
151-
- Quoted line protocol via standard input (stdin)
151+
- Quoted line protocol data via standard input (stdin) or a file
152+
153+
### Write data via standard input (stdin)
152154

153155
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
154156
```bash
155157
influxdb3 write \
156158
--database DATABASE_NAME \
157159
--token AUTH_TOKEN \
160+
--precision s \
158161
'home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
159162
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
160163
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
@@ -192,20 +195,20 @@ In the code samples, replace the following placeholders with your values:
192195
your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission
193196
to write to the specified database{{% /show-in %}}
194197

195-
##### Write data from a file
198+
### Write data from a file
196199

197200
Pass the `--file` option to write line protocol you have saved to a file--for example, save the
198-
[sample line protocol](#write-data-in-line-protocol-syntax) to a file named `server_data`
201+
[sample line protocol](#home-sensor-data-line-protocol) to a file named `sensor_data`
199202
and then enter the following command:
200203

201204
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
202205
```bash
203206
influxdb3 write \
204207
--database DATABASE_NAME \
205208
--token AUTH_TOKEN \
206-
--precision ns \
209+
--precision s \
207210
--accept-partial \
208-
--file path/to/server_data
211+
--file path/to/sensor_data
209212
```
210213
{{% /code-placeholders %}}
211214

0 commit comments

Comments
 (0)