feat(sample-data): add new wind sample dataset (#6440)
* feat(sample-data): add new wind sample dataset * Apply suggestions from code review Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com> * fix(js): fix syntax error and lint --------- Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>pull/6447/head
parent
990da1b168
commit
c3468f667d
|
|
@ -34,7 +34,8 @@ export function InfluxDBUrl() {
|
|||
const elementSelector = '.article--content pre:not(.preserve)';
|
||||
|
||||
///////////////////// Stored preference management ///////////////////////
|
||||
// Retrieve the user's InfluxDB preference (cloud or oss) from the influxdb_pref local storage key. Default is cloud.
|
||||
// Retrieve the user's InfluxDB preference (cloud or oss) from the
|
||||
// influxdb_pref local storage key. Default is cloud.
|
||||
function getURLPreference() {
|
||||
return getPreference('influxdb_url');
|
||||
}
|
||||
|
|
@ -100,9 +101,9 @@ export function InfluxDBUrl() {
|
|||
removeInfluxDBUrl(product);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////// InfluxDB URL utility functions ////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////// InfluxDB URL utility functions ///////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Preserve URLs in codeblocks that come just after or are inside a div
|
||||
// with the class, .keep-url
|
||||
|
|
@ -110,7 +111,8 @@ export function InfluxDBUrl() {
|
|||
$('.keep-url').each(function () {
|
||||
// For code blocks with no syntax highlighting
|
||||
$(this).next('pre').addClass('preserve');
|
||||
// For code blocks with no syntax highlighting inside of a link (API endpoint blocks)
|
||||
// For code blocks with no syntax highlighting inside of a link
|
||||
// (API endpoint blocks)
|
||||
$(this).next('a').find('pre').addClass('preserve');
|
||||
// For code blocks with syntax highlighting
|
||||
$(this).next('.highlight').find('pre').addClass('preserve');
|
||||
|
|
@ -127,8 +129,8 @@ export function InfluxDBUrl() {
|
|||
return { oss, cloud, core, enterprise, serverless, dedicated, clustered };
|
||||
}
|
||||
|
||||
// Retrieve the previously selected URLs from the from the urls local storage object.
|
||||
// This is used to update URLs whenever you switch between browser tabs.
|
||||
// Retrieve the previously selected URLs from the urls local storage
|
||||
// object. This updates URLs when switching between browser tabs.
|
||||
function getPrevUrls() {
|
||||
const {
|
||||
prev_cloud: cloud,
|
||||
|
|
@ -291,7 +293,7 @@ export function InfluxDBUrl() {
|
|||
});
|
||||
}
|
||||
|
||||
// Append the URL selector button to each codeblock containing a placeholder URL
|
||||
// Append the URL selector button to codeblocks that contain a placeholder URL
|
||||
function appendUrlSelector(
|
||||
urls = {
|
||||
cloud: '',
|
||||
|
|
@ -320,19 +322,29 @@ export function InfluxDBUrl() {
|
|||
return contextText[context];
|
||||
};
|
||||
|
||||
appendToUrls.forEach(function (url) {
|
||||
$(elementSelector).each(function () {
|
||||
var code = $(this).html();
|
||||
if (code.includes(url)) {
|
||||
$(this).after(
|
||||
"<div class='select-url'><a class='url-trigger' href='#'>" +
|
||||
getBtnText(PRODUCT_CONTEXT) +
|
||||
'</a></div>'
|
||||
);
|
||||
$('.select-url').fadeIn(400);
|
||||
}
|
||||
// Process each code block only once
|
||||
$(elementSelector).each(function () {
|
||||
var code = $(this).html();
|
||||
var $codeBlock = $(this);
|
||||
|
||||
// Check if this code block contains any of the URLs
|
||||
var containsUrl = appendToUrls.some(function (url) {
|
||||
return url && code.includes(url);
|
||||
});
|
||||
|
||||
// If the code block contains at least one URL and doesn't already have a
|
||||
// URL selector button
|
||||
if (containsUrl && !$codeBlock.next('.select-url').length) {
|
||||
$codeBlock.after(
|
||||
"<div class='select-url'><a class='url-trigger' href='#'>" +
|
||||
getBtnText(PRODUCT_CONTEXT) +
|
||||
'</a></div>'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Fade in all select-url elements after they've been added
|
||||
$('.select-url').fadeIn(400);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -365,9 +377,9 @@ export function InfluxDBUrl() {
|
|||
// Set active radio button on page load
|
||||
setRadioButtons(getUrls());
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////// Modal window interactions ///////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////// Modal window interactions //////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// General modal window interactions are controlled in modals.js
|
||||
|
||||
|
|
@ -513,12 +525,18 @@ export function InfluxDBUrl() {
|
|||
// Toggled preferred service on load
|
||||
showPreference();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////// Custom URLs //////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// Custom URLs /////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Validate custom URLs
|
||||
function validateUrl(url) {
|
||||
/** Match 3 possible types of hosts:
|
||||
* Named host = (unreserved | pct-encoded | sub-delims)+
|
||||
* IPv6 host = \[([a-f0-9:.]+)\]
|
||||
* IPvFuture host = \[v[a-f0-9][a-z0-9\-._~%!$&'()*+,;=:]+\]
|
||||
* Port = [0-9]+
|
||||
*/
|
||||
/** validDomain = (Named host | IPv6 host | IPvFuture host)(:Port)? **/
|
||||
const validDomain = new RegExp(
|
||||
`([a-z0-9\-._~%]+` +
|
||||
|
|
@ -536,7 +554,7 @@ export function InfluxDBUrl() {
|
|||
const domain = url.replace(protocol, '');
|
||||
|
||||
// First use the regex to check for an HTTP protocol and valid domain
|
||||
// --JS URL validation can't differentiate host:port string from a protocol.
|
||||
// JS URL validation can't differentiate host:port string from a protocol.
|
||||
if (validProtocol.test(protocol) == false) {
|
||||
return { valid: false, error: 'Invalid protocol, use http[s]' };
|
||||
} else if (validDomain.test(domain) == false) {
|
||||
|
|
@ -598,7 +616,9 @@ export function InfluxDBUrl() {
|
|||
removeCustomUrl();
|
||||
hideValidationMessage();
|
||||
$(
|
||||
`input[name="influxdb-${PRODUCT_CONTEXT}-url"][value="${DEFAULT_STORAGE_URLS[PRODUCT_CONTEXT]}"]`
|
||||
`input[name="influxdb-${PRODUCT_CONTEXT}-url"][value="` +
|
||||
DEFAULT_STORAGE_URLS[PRODUCT_CONTEXT] +
|
||||
'"]'
|
||||
).trigger('click');
|
||||
}
|
||||
}
|
||||
|
|
@ -659,7 +679,7 @@ export function InfluxDBUrl() {
|
|||
'#clustered-url-field',
|
||||
].join();
|
||||
|
||||
// Store the custom InfluxDB URL or product-specific URL when exiting the field
|
||||
// Store the custom InfluxDB URL or product-specific URL when exiting fields
|
||||
$(urlValueElements).blur(function () {
|
||||
!['dedicated', 'clustered'].includes(PRODUCT_CONTEXT)
|
||||
? applyCustomUrl()
|
||||
|
|
@ -694,9 +714,9 @@ export function InfluxDBUrl() {
|
|||
$(`#${productEl}-url-field`).val(productUrlCookie);
|
||||
});
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////// Dynamically update URLs ////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////// Dynamically update URLs ///////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Check if the referrerHost is one of the cloud URLs
|
||||
// cloudUrls is built dynamically in layouts/partials/footer/javascript.html
|
||||
|
|
|
|||
|
|
@ -99,5 +99,5 @@ a.btn {
|
|||
li .url-trigger { padding: 0rem .5rem; }
|
||||
|
||||
.code-tab-content {
|
||||
.select-url{margin-top: -3.25rem}
|
||||
.select-url{margin-top: -3.15rem}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,495 +9,9 @@ menu:
|
|||
name: Sample data
|
||||
parent: Reference
|
||||
weight: 110
|
||||
source: /shared/influxdb3-sample-data/sample-data-dist.md
|
||||
---
|
||||
|
||||
Sample datasets are used throughout the {{< product-name >}} documentation to
|
||||
demonstrate functionality.
|
||||
Use the following sample datasets to replicate provided examples.
|
||||
|
||||
- [Get started home sensor data](#get-started-home-sensor-data)
|
||||
- [Home sensor actions data](#home-sensor-actions-data)
|
||||
- [NOAA Bay Area weather data](#noaa-bay-area-weather-data)
|
||||
- [Bitcoin price data](#bitcoin-price-data)
|
||||
- [Random numbers sample data](#random-numbers-sample-data)
|
||||
|
||||
## Get started home sensor data
|
||||
|
||||
Includes hourly home sensor data used in the
|
||||
[Get started with {{< product-name >}}](/influxdb3/cloud-dedicated/get-started/) guide.
|
||||
This dataset includes anomalous sensor readings and helps to demonstrate
|
||||
processing and alerting on time series data.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- **fields**:
|
||||
- co <em style="opacity: .5">(integer)</em>
|
||||
- temp <em style="opacity: .5">(float)</em>
|
||||
- hum <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the Get started home sensor sample data
|
||||
to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Home sensor actions data
|
||||
|
||||
Includes hypothetical actions triggered by data in the [Get started home sensor data](#get-started-home-sensor-data)
|
||||
and is a companion dataset to that sample dataset.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home_actions <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- action
|
||||
- alert
|
||||
- cool
|
||||
- level
|
||||
- ok
|
||||
- warn
|
||||
- **fields**:
|
||||
- description <em style="opacity: .5">(string)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor actions data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor actions data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the home sensor actions sample data
|
||||
to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## NOAA Bay Area weather data
|
||||
|
||||
Includes daily weather metrics from three San Francisco Bay Area airports from
|
||||
**January 1, 2020 to December 31, 2022**.
|
||||
This sample dataset includes seasonal trends and is good for exploring time
|
||||
series use cases that involve seasonality.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2020-01-01T00:00:00Z** to **2022-12-31T00:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- weather <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- location
|
||||
- Concord
|
||||
- Hayward
|
||||
- San Francisco
|
||||
- **fields**
|
||||
- precip <em style="opacity: .5">(float)</em>
|
||||
- temp_avg <em style="opacity: .5">(float)</em>
|
||||
- temp_max <em style="opacity: .5">(float)</em>
|
||||
- temp_min <em style="opacity: .5">(float)</em>
|
||||
- wind_avg <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the NOAA Bay Area weather data to InfluxDB" %}}
|
||||
|
||||
#### Write the NOAA Bay Area weather data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the NOAA Bay Area weather sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Bitcoin price data
|
||||
|
||||
The Bitcoin price sample dataset provides Bitcoin prices from
|
||||
**2023-05-01T00:00:00Z to 2023-05-15T00:00:00Z**—_[Powered by CoinDesk](https://www.coindesk.com/price/bitcoin)_.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-05-01T00:19:00Z** to **2023-05-14T23:48:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- bitcoin <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- code
|
||||
- EUR
|
||||
- GBP
|
||||
- USD
|
||||
- crypto
|
||||
- bitcoin
|
||||
- description
|
||||
- Euro
|
||||
- British Pound Sterling
|
||||
- United States Dollar
|
||||
- symbol
|
||||
- \€ <em style="opacity: .5">(€)</em>
|
||||
- \£ <em style="opacity: .5">(£)</em>
|
||||
- \$ <em style="opacity: .5">($)</em>
|
||||
- **fields**
|
||||
- price <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the Bitcoin sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the Bitcoin price sample data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the Bitcoin price sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Random numbers sample data
|
||||
|
||||
Includes two fields with randomly generated numbers reported every minute.
|
||||
Each field has a specific range of randomly generated numbers.
|
||||
This sample dataset is used to demonstrate mathematic operations and
|
||||
transformation functions.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-01-01T00:00:00Z** to **2023-01-01T12:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- numbers <em style="opacity: .5">(measurement)</em>
|
||||
- **fields**
|
||||
- a <em style="opacity: .5">(float between -1 and 1)</em>
|
||||
- b <em style="opacity: .5">(float between -3 and 3)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the random number sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the random number sample data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the random number sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
<!--
|
||||
//SOURCE content/shared/influxdb3-sample-data/sample-data-dist.md
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Use the following sample datasets to replicate provided examples.
|
|||
- [Get started home sensor data](#get-started-home-sensor-data)
|
||||
- [Home sensor actions data](#home-sensor-actions-data)
|
||||
- [NOAA Bay Area weather data](#noaa-bay-area-weather-data)
|
||||
- [European Union wind data](#european-union-wind-data)
|
||||
- [Bitcoin price data](#bitcoin-price-data)
|
||||
- [Random numbers sample data](#random-numbers-sample-data)
|
||||
|
||||
|
|
@ -348,6 +349,78 @@ Replace the following in the sample script:
|
|||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## European Union wind data
|
||||
|
||||
The European Union (EU) wind sample dataset provides hourly measurements of
|
||||
wind speed and wind direction from various cities in the EU.
|
||||
The dataset includes a hierarchical tag set of country, county, and city.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2025-10-01T00:00:00Z** to **2025-10-01T23:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- wind_data <em style="opacity: .5">(table)</em>
|
||||
- **tags**:
|
||||
- country
|
||||
- _20 countries_
|
||||
- county
|
||||
- _111 counties_
|
||||
- city
|
||||
- _129 cities_
|
||||
- **fields**:
|
||||
- wind_speed <em style="opacity: .5">(float)</em>
|
||||
- wind_direction <em style="opacity: .5">(integer)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the EU wind sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the EU wind sample data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the EU wind sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your {{% product-name %}} database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Bitcoin price data
|
||||
|
||||
The Bitcoin price sample dataset provides Bitcoin prices from
|
||||
|
|
|
|||
|
|
@ -9,495 +9,9 @@ menu:
|
|||
name: Sample data
|
||||
parent: Reference
|
||||
weight: 182
|
||||
source: /shared/influxdb3-sample-data/sample-data-dist.md
|
||||
---
|
||||
|
||||
Sample datasets are used throughout the {{< product-name >}} documentation to
|
||||
demonstrate functionality.
|
||||
Use the following sample datasets to replicate provided examples.
|
||||
|
||||
- [Get started home sensor data](#get-started-home-sensor-data)
|
||||
- [Home sensor actions data](#home-sensor-actions-data)
|
||||
- [NOAA Bay Area weather data](#noaa-bay-area-weather-data)
|
||||
- [Bitcoin price data](#bitcoin-price-data)
|
||||
- [Random numbers sample data](#random-numbers-sample-data)
|
||||
|
||||
## Get started home sensor data
|
||||
|
||||
Includes hourly home sensor data used in the
|
||||
[Get started with {{< product-name >}}](/influxdb3/clustered/get-started/) guide.
|
||||
This dataset includes anomalous sensor readings and helps to demonstrate
|
||||
processing and alerting on time series data.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- **fields**:
|
||||
- co <em style="opacity: .5">(integer)</em>
|
||||
- temp <em style="opacity: .5">(float)</em>
|
||||
- hum <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the Get started home sensor sample data
|
||||
to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your [database](/influxdb3/clustered/admin/databases/)
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/clustered/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Home sensor actions data
|
||||
|
||||
Includes hypothetical actions triggered by data in the [Get started home sensor data](#get-started-home-sensor-data)
|
||||
and is a companion dataset to that sample dataset.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home_actions <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- action
|
||||
- alert
|
||||
- cool
|
||||
- level
|
||||
- ok
|
||||
- warn
|
||||
- **fields**:
|
||||
- description <em style="opacity: .5">(string)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor actions data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor actions data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the home sensor actions sample data
|
||||
to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your [database](/influxdb3/clustered/admin/databases/)
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/clustered/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## NOAA Bay Area weather data
|
||||
|
||||
Includes daily weather metrics from three San Francisco Bay Area airports from
|
||||
**January 1, 2020 to December 31, 2022**.
|
||||
This sample dataset includes seasonal trends and is good for exploring time
|
||||
series use cases that involve seasonality.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2020-01-01T00:00:00Z** to **2022-12-31T00:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- weather <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- location
|
||||
- Concord
|
||||
- Hayward
|
||||
- San Francisco
|
||||
- **fields**
|
||||
- precip <em style="opacity: .5">(float)</em>
|
||||
- temp_avg <em style="opacity: .5">(float)</em>
|
||||
- temp_max <em style="opacity: .5">(float)</em>
|
||||
- temp_min <em style="opacity: .5">(float)</em>
|
||||
- wind_avg <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the NOAA Bay Area weather data to InfluxDB" %}}
|
||||
|
||||
#### Write the NOAA Bay Area weather data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the NOAA Bay Area weather sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your [database](/influxdb3/clustered/admin/databases/)
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/clustered/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Bitcoin price data
|
||||
|
||||
The Bitcoin price sample dataset provides Bitcoin prices from
|
||||
**2023-05-01T00:00:00Z to 2023-05-15T00:00:00Z**—_[Powered by CoinDesk](https://www.coindesk.com/price/bitcoin)_.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-05-01T00:19:00Z** to **2023-05-14T23:48:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- bitcoin <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- code
|
||||
- EUR
|
||||
- GBP
|
||||
- USD
|
||||
- crypto
|
||||
- bitcoin
|
||||
- description
|
||||
- Euro
|
||||
- British Pound Sterling
|
||||
- United States Dollar
|
||||
- symbol
|
||||
- \€ <em style="opacity: .5">(€)</em>
|
||||
- \£ <em style="opacity: .5">(£)</em>
|
||||
- \$ <em style="opacity: .5">($)</em>
|
||||
- **fields**
|
||||
- price <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the Bitcoin sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the Bitcoin price sample data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the Bitcoin price sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your [database](/influxdb3/clustered/admin/databases/)
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/clustered/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Random numbers sample data
|
||||
|
||||
Includes two fields with randomly generated numbers reported every minute.
|
||||
Each field has a specific range of randomly generated numbers.
|
||||
This sample dataset is used to demonstrate mathematic operations and
|
||||
transformation functions.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-01-01T00:00:00Z** to **2023-01-01T12:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- numbers <em style="opacity: .5">(measurement)</em>
|
||||
- **fields**
|
||||
- a <em style="opacity: .5">(float between -1 and 1)</em>
|
||||
- b <em style="opacity: .5">(float between -3 and 3)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the random number sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the random number sample data to InfluxDB
|
||||
|
||||
Use the InfluxDB v2 or v1 API to write the random number sample data to
|
||||
{{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "DATABASE_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your [database](/influxdb3/clustered/admin/databases/)
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/clustered/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
<!--
|
||||
//SOURCE content/shared/influxdb3-sample-data/sample-data-dist.md
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,653 @@
|
|||
Sample datasets are used throughout the {{< product-name >}} documentation to
|
||||
demonstrate functionality.
|
||||
Use the following sample datasets to replicate provided examples.
|
||||
|
||||
- [Get started home sensor data](#get-started-home-sensor-data)
|
||||
- [Home sensor actions data](#home-sensor-actions-data)
|
||||
- [NOAA Bay Area weather data](#noaa-bay-area-weather-data)
|
||||
- [European Union wind data](#european-union-wind-data)
|
||||
- [Bitcoin price data](#bitcoin-price-data)
|
||||
- [Random numbers sample data](#random-numbers-sample-data)
|
||||
|
||||
## Get started home sensor data
|
||||
|
||||
Includes hourly home sensor data used in the
|
||||
[Get started with {{< product-name >}}](/influxdb3/version/get-started/) guide.
|
||||
This dataset includes anomalous sensor readings and helps to demonstrate
|
||||
processing and alerting on time series data.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- **fields**:
|
||||
- co <em style="opacity: .5">(integer)</em>
|
||||
- temp <em style="opacity: .5">(float)</em>
|
||||
- hum <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the Get started
|
||||
home sensor sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
--precision s \
|
||||
"home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "
|
||||
home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
|
||||
home,room=Kitchen temp=23.0,hum=36.2,co=0i 1641027600
|
||||
home,room=Living\ Room temp=21.8,hum=36.0,co=0i 1641031200
|
||||
home,room=Kitchen temp=22.7,hum=36.1,co=0i 1641031200
|
||||
home,room=Living\ Room temp=22.2,hum=36.0,co=0i 1641034800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=0i 1641034800
|
||||
home,room=Living\ Room temp=22.2,hum=35.9,co=0i 1641038400
|
||||
home,room=Kitchen temp=22.5,hum=36.0,co=0i 1641038400
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=0i 1641042000
|
||||
home,room=Kitchen temp=22.8,hum=36.5,co=1i 1641042000
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=0i 1641045600
|
||||
home,room=Kitchen temp=22.8,hum=36.3,co=1i 1641045600
|
||||
home,room=Living\ Room temp=22.3,hum=36.1,co=1i 1641049200
|
||||
home,room=Kitchen temp=22.7,hum=36.2,co=3i 1641049200
|
||||
home,room=Living\ Room temp=22.4,hum=36.0,co=4i 1641052800
|
||||
home,room=Kitchen temp=22.4,hum=36.0,co=7i 1641052800
|
||||
home,room=Living\ Room temp=22.6,hum=35.9,co=5i 1641056400
|
||||
home,room=Kitchen temp=22.7,hum=36.0,co=9i 1641056400
|
||||
home,room=Living\ Room temp=22.8,hum=36.2,co=9i 1641060000
|
||||
home,room=Kitchen temp=23.3,hum=36.9,co=18i 1641060000
|
||||
home,room=Living\ Room temp=22.5,hum=36.3,co=14i 1641063600
|
||||
home,room=Kitchen temp=23.1,hum=36.6,co=22i 1641063600
|
||||
home,room=Living\ Room temp=22.2,hum=36.4,co=17i 1641067200
|
||||
home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
||||
"
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Home sensor actions data
|
||||
|
||||
Includes hypothetical actions triggered by data in the [Get started home sensor data](#get-started-home-sensor-data)
|
||||
and is a companion dataset to that sample dataset.
|
||||
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
|
||||
the lower right corner of the page.
|
||||
This lets you modify the sample dataset to stay within the retention period of
|
||||
the database you write it to.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T08:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
to
|
||||
**{{% influxdb/custom-timestamps-span %}}2022-01-01T20:00:00Z{{% /influxdb/custom-timestamps-span %}}**
|
||||
<em style="opacity: .5">(Customizable)</em>
|
||||
|
||||
##### Schema
|
||||
|
||||
- home_actions <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- room
|
||||
- Kitchen
|
||||
- Living Room
|
||||
- action
|
||||
- alert
|
||||
- cool
|
||||
- level
|
||||
- ok
|
||||
- warn
|
||||
- **fields**:
|
||||
- description <em style="opacity: .5">(string)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write home sensor actions data to InfluxDB" %}}
|
||||
|
||||
#### Write the home sensor actions data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the home sensor
|
||||
actions sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
--precision s \
|
||||
'home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary '
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23°C). Cooling to 22°C." 1641027600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.3°C). Cooling to 22°C." 1641060000
|
||||
home_actions,room=Kitchen,action=cool,level=ok description="Temperature at or above 23°C (23.1°C). Cooling to 22°C." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 18 ppm." 1641060000
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 22 ppm." 1641063600
|
||||
home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide level above normal: 26 ppm." 1641067200
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with _write_ permission to the database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## NOAA Bay Area weather data
|
||||
|
||||
Includes daily weather metrics from three San Francisco Bay Area airports from
|
||||
**January 1, 2020 to December 31, 2022**.
|
||||
This sample dataset includes seasonal trends and is good for exploring time
|
||||
series use cases that involve seasonality.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2020-01-01T00:00:00Z** to **2022-12-31T00:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- weather <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- location
|
||||
- Concord
|
||||
- Hayward
|
||||
- San Francisco
|
||||
- **fields**
|
||||
- precip <em style="opacity: .5">(float)</em>
|
||||
- temp_avg <em style="opacity: .5">(float)</em>
|
||||
- temp_max <em style="opacity: .5">(float)</em>
|
||||
- temp_min <em style="opacity: .5">(float)</em>
|
||||
- wind_avg <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the NOAA Bay Area weather data to InfluxDB" %}}
|
||||
|
||||
#### Write the NOAA Bay Area weather data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the NOAA Bay Area
|
||||
weather sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## European Union wind data
|
||||
|
||||
The European Union (EU) wind sample dataset provides hourly measurements of
|
||||
wind speed and wind direction from various cities in the EU.
|
||||
The dataset includes a hierarchical tag set of country, county, and city.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2025-10-01T00:00:00Z** to **2025-10-01T23:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- wind_data <em style="opacity: .5">(table)</em>
|
||||
- **tags**:
|
||||
- country
|
||||
- _20 countries_
|
||||
- county
|
||||
- _111 counties_
|
||||
- city
|
||||
- _129 cities_
|
||||
- **fields**:
|
||||
- wind_speed <em style="opacity: .5">(float)</em>
|
||||
- wind_direction <em style="opacity: .5">(integer)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the EU wind sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the EU wind sample data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the
|
||||
EU wind sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
--precision s \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your {{% product-name %}} database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Bitcoin price data
|
||||
|
||||
The Bitcoin price sample dataset provides Bitcoin prices from
|
||||
**2023-05-01T00:00:00Z to 2023-05-15T00:00:00Z**—_[Powered by CoinDesk](https://www.coindesk.com/price/bitcoin)_.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-05-01T00:19:00Z** to **2023-05-14T23:48:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- bitcoin <em style="opacity: .5">(measurement)</em>
|
||||
- **tags**:
|
||||
- code
|
||||
- EUR
|
||||
- GBP
|
||||
- USD
|
||||
- crypto
|
||||
- bitcoin
|
||||
- description
|
||||
- Euro
|
||||
- British Pound Sterling
|
||||
- United States Dollar
|
||||
- symbol
|
||||
- \€ <em style="opacity: .5">(€)</em>
|
||||
- \£ <em style="opacity: .5">(£)</em>
|
||||
- \$ <em style="opacity: .5">($)</em>
|
||||
- **fields**
|
||||
- price <em style="opacity: .5">(float)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the Bitcoin sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the Bitcoin price sample data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the Bitcoin price
|
||||
sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## Random numbers sample data
|
||||
|
||||
Includes two fields with randomly generated numbers reported every minute.
|
||||
Each field has a specific range of randomly generated numbers.
|
||||
This sample dataset is used to demonstrate mathematic operations and
|
||||
transformation functions.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2023-01-01T00:00:00Z** to **2023-01-01T12:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- numbers <em style="opacity: .5">(measurement)</em>
|
||||
- **fields**
|
||||
- a <em style="opacity: .5">(float between -1 and 1)</em>
|
||||
- b <em style="opacity: .5">(float between -3 and 3)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the random number sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the random number sample data to InfluxDB
|
||||
|
||||
Use the `influxctl` CLI or the InfluxDB v2 or v1 APIs to write the random number
|
||||
sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxctl](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
influxctl write \
|
||||
--token DATABASE_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="DATABASE_(TOKEN|NAME)"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
your InfluxDB Cloud Dedicated database
|
||||
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
|
||||
a [database token](/influxdb3/version/admin/tokens/#database-tokens)
|
||||
with sufficient permissions to the specified database
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
|
@ -6,6 +6,7 @@ Use the following sample datasets to replicate provided examples.
|
|||
- [Home sensor data](#home-sensor-data)
|
||||
- [Home sensor actions data](#home-sensor-actions-data)
|
||||
- [NOAA Bay Area weather data](#noaa-bay-area-weather-data)
|
||||
- [European Union wind data](#european-union-wind-data)
|
||||
- [Bitcoin price data](#bitcoin-price-data)
|
||||
- [Random numbers sample data](#random-numbers-sample-data)
|
||||
|
||||
|
|
@ -92,7 +93,11 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200'
|
|||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
```bash { placeholders="AUTH_TOKEN|DATABASE_NAME" }
|
||||
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=true" \
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-raw "home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1735545600
|
||||
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1735545600
|
||||
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1735549200
|
||||
|
|
@ -266,8 +271,7 @@ home sensor actions sample data to {{< product-name >}}.
|
|||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
influxdb3 write \
|
||||
--token AUTH_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
|
|
@ -280,16 +284,18 @@ home_actions,room=Kitchen,action=alert,level=warn description="Carbon monoxide l
|
|||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 14 ppm." 1641063600
|
||||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=true" \
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-raw "home_actions,room=Kitchen,action=cool,level=ok description=\"Temperature at or above 23°C (23°C). Cooling to 22°C.\" 1739437200
|
||||
home_actions,room=Kitchen,action=cool,level=ok description=\"Temperature at or above 23°C (23.3°C). Cooling to 22°C.\" 1739469600
|
||||
home_actions,room=Kitchen,action=cool,level=ok description=\"Temperature at or above 23°C (23.1°C). Cooling to 22°C.\" 1739473200
|
||||
|
|
@ -299,15 +305,13 @@ home_actions,room=Kitchen,action=alert,level=warn description=\"Carbon monoxide
|
|||
home_actions,room=Living Room,action=alert,level=warn description=\"Carbon monoxide level above normal: 14 ppm.\" 1739473200
|
||||
home_actions,room=Living Room,action=alert,level=warn description=\"Carbon monoxide level above normal: 17 ppm.\" 1739476800"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
|
|
@ -324,15 +328,13 @@ home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monox
|
|||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% influxdb/custom-timestamps %}}
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
|
|
@ -348,7 +350,6 @@ home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monox
|
|||
home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monoxide level above normal: 17 ppm." 1641067200
|
||||
'
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
{{% /influxdb/custom-timestamps %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
|
|
@ -407,30 +408,29 @@ NOAA Bay Area weather sample data to {{< product-name >}}.
|
|||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
influxdb3 write \
|
||||
--token AUTH_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
|
|
@ -438,20 +438,113 @@ curl --request POST \
|
|||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bay-area-weather.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
Replace the following in the sample script:
|
||||
|
||||
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
|
||||
the name of database to write to
|
||||
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
|
||||
your {{< product-name >}} {{% token-link %}}
|
||||
|
||||
{{% /expand %}}
|
||||
{{< /expand-wrapper >}}
|
||||
|
||||
## European Union wind data
|
||||
|
||||
The European Union (EU) wind sample dataset provides hourly measurements of
|
||||
wind speed and wind direction from various cities in the EU.
|
||||
The dataset includes a hierarchical tag set of country, county, and city.
|
||||
|
||||
##### Time Range
|
||||
|
||||
**2025-10-01T00:00:00Z** to **2025-10-01T23:00:00Z**
|
||||
|
||||
##### Schema
|
||||
|
||||
- wind_data <em style="opacity: .5">(table)</em>
|
||||
- **tags**:
|
||||
- country
|
||||
- _20 countries_
|
||||
- county
|
||||
- _111 counties_
|
||||
- city
|
||||
- _129 cities_
|
||||
- **fields**:
|
||||
- wind_speed <em style="opacity: .5">(float)</em>
|
||||
- wind_direction <em style="opacity: .5">(integer)</em>
|
||||
|
||||
{{< expand-wrapper >}}
|
||||
{{% expand "Write the EU wind sample data to InfluxDB" %}}
|
||||
|
||||
#### Write the EU wind sample data to InfluxDB
|
||||
|
||||
Use the `influxdb3` CLI, InfluxDB v3 API, InfluxDB v2 API, or InfluxDB v1 API to write the
|
||||
EU wind sample data to {{< product-name >}}.
|
||||
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[influxdb3](#)
|
||||
[v3 API](#)
|
||||
[v2 API](#)
|
||||
[v1 API](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
influxdb3 write \
|
||||
--token AUTH_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
|
@ -513,37 +606,47 @@ Bitcoin price sample data to {{< product-name >}}.
|
|||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
influxdb3 write \
|
||||
--token AUTH_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
|
@ -593,30 +696,29 @@ random number sample data to {{< product-name >}}.
|
|||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
influxdb3 write \
|
||||
--token AUTH_TOKEN \
|
||||
--database DATABASE_NAME \
|
||||
"$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/bitcoin.lp)"
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v3/write_lp?db=DATABASE_NAME&precision=auto&accept_partial=false \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-Type: text/plain; charset=utf-8" \
|
||||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
|
|
@ -624,20 +726,17 @@ curl --request POST \
|
|||
--header "Accept: application/json" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
|
||||
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
|
||||
```sh
|
||||
```sh {placeholders="AUTH_TOKEN|DATABASE_NAME"}
|
||||
curl --request POST \
|
||||
http://{{< influxdb/host >}}/write?db=DATABASE_NAME \
|
||||
--header "Authorization: Bearer AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary "$(curl --request GET https://docs.influxdata.com/downloads/random-numbers.lp)"
|
||||
```
|
||||
{{% /code-placeholders %}}
|
||||
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue