Skip to content

Commit

Permalink
InfluxDB: Educate about loading ILP data
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Dec 21, 2024
1 parent c711ed9 commit 0e77a21
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions docs/integrate/influxdb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,38 @@
(import-influxdb)=
# Import data from InfluxDB

In this quick tutorial, you'll use the [CrateDB Toolkit InfluxDB I/O subsystem]
to import data from [InfluxDB] into [CrateDB].

:::{note}
**Important:** The tutorial uses adapter software which is currently in beta testing.
If you discover any issues, please [report them] back to us.
:::
In this quick tutorial, you will use the [CrateDB Toolkit InfluxDB I/O subsystem]
to import data from [InfluxDB] into [CrateDB]. You can also import data directly
from files in InfluxDB line protocol format.

## Synopsis

### InfluxDB Server
Transfer data from InfluxDB bucket/measurement into CrateDB schema/table.
:::{code} shell
```shell
ctk load table \
"influxdb2://example:[email protected]:8086/testdrive/demo" \
--cratedb-sqlalchemy-url="crate://user:[email protected]:4200/testdrive/demo"
:::
```
Query data in CrateDB.
```shell
export CRATEPW=password
crash --host=cratedb.example.org --username=user --command='SELECT * FROM testdrive.demo;'
```

### InfluxDB Line Protocol
Transfer data from InfluxDB line protocol file into CrateDB schema/table.
```shell
ctk load table \
"https://github.com/influxdata/influxdb2-sample-data/raw/master/air-sensor-data/air-sensor-data.lp" \
--cratedb-sqlalchemy-url="crate://user:[email protected]:4200/testdrive/air-sensor-data"
```
Query data in CrateDB.
:::{code} shell
```shell
export CRATEPW=password
crash --host=cratedb.example.org --username=user --command="SELECT * FROM testdrive.demo;"
:::
crash --host=cratedb.example.org --username=user --command='SELECT * FROM testdrive."air-sensor-data";'
```


## Data Model

Expand All @@ -37,9 +48,6 @@ data in schemas and tables.
- A **field** is similar to an un-indexed column in an SQL database.
- A **point** is similar to an SQL row.

-- [What are series and bucket in InfluxDB]


## Tutorial

The tutorial heavily uses Docker to provide services and to run jobs.
Expand Down Expand Up @@ -164,6 +172,11 @@ The InfluxDB I/O subsystem is based on the [influxio] package. Please also
check its documentation to learn about more of its capabilities, supporting
you when working with InfluxDB.

:::{note}
**Important:** If you discover any issues with this adapter, please
[report them] back to us.
:::


[cloud platform]: https://docs.influxdata.com/influxdb/cloud/admin
[CrateDB]: https://github.com/crate/crate
Expand Down

0 comments on commit 0e77a21

Please sign in to comment.