diff --git a/docs/integrate/dapr/usage.md b/docs/integrate/dapr/usage.md index f0218860..51697810 100644 --- a/docs/integrate/dapr/usage.md +++ b/docs/integrate/dapr/usage.md @@ -43,7 +43,7 @@ To configure the output binding of your application: There are now two services running, the actual application (port 3000) and a web service with the so-called Dapr sidecar (port 3500). Below are some examples of how to interact with the PostgreSQL binding via the Dapr sidecar (see the PostgreSQL binding specification for reference): ```bash -# SELECT statements via the query operation +# Submit SELECT statements via the query operation. curl -X POST http://localhost:3500/v1.0/bindings/crate \ -H "Content-Type: application/json" \ -d '{ @@ -53,17 +53,17 @@ curl -X POST http://localhost:3500/v1.0/bindings/crate \ } }' -# DDL statements via the exec operation +# Submit DDL or DML statements via the exec operation. curl -X POST http://localhost:3500/v1.0/bindings/crate \ -H "Content-Type: application/json" \ -d '{ "operation": "exec", "metadata": { - "sql": "INSERT INTO . VALUES (NOW(), 123, \'some string...\')" + "sql": "INSERT INTO .
VALUES (NOW(), 123, '"'"'some string...'"'"')" } }' -# closes the connection pool, no further queries will be possible +# Close the connection pool, no further queries will be possible. curl -X POST http://localhost:3500/v1.0/bindings/crate \ -H "Content-Type: application/json" \ -d '{ diff --git a/docs/integrate/influxdb/index.md b/docs/integrate/influxdb/index.md index 960b7214..114551c8 100644 --- a/docs/integrate/influxdb/index.md +++ b/docs/integrate/influxdb/index.md @@ -24,14 +24,33 @@ fast query response times to build user interfaces, monitoring, and automation s ::: -:::{rubric} Synopsis +:::{rubric} Synopsis (Server API) ::: +Transfer data from InfluxDB bucket/measurement into CrateDB schema/table. ```shell ctk load table \ "influxdb2://example:token@influxdb.example.org:8086/testdrive/demo" \ --cluster-url="crate://user:password@cratedb.example.org:4200/testdrive/demo" ``` +Query data in CrateDB. +```shell +crash -c 'SELECT * FROM testdrive.demo;' +``` + +:::{rubric} Synopsis (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" \ + --cluster-url="crate://user:password@cratedb.example.org:4200/testdrive/air-sensor-data" +``` +Query data in CrateDB. +```shell +crash -c 'SELECT * FROM testdrive."air-sensor-data";' +``` That's the blueprint for the InfluxDB URI: ```text diff --git a/docs/integrate/influxdb/usage.md b/docs/integrate/influxdb/usage.md index e1069236..77f6df02 100644 --- a/docs/integrate/influxdb/usage.md +++ b/docs/integrate/influxdb/usage.md @@ -5,34 +5,6 @@ In this quick usage guide, you will use the [CrateDB Toolkit InfluxDB I/O subsys 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. -```shell -ctk load table \ - "influxdb2://example:token@influxdb.example.org:8086/testdrive/demo" \ - --cluster-url="crate://user:password@cratedb.example.org: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" \ - --cluster-url="crate://user:password@cratedb.example.org:4200/testdrive/air-sensor-data" -``` -Query data in CrateDB. -```shell -export CRATEPW=password -crash --host=cratedb.example.org --username=user --command='SELECT * FROM testdrive."air-sensor-data";' -``` - ## Prerequisites Use Docker or Podman to run all components. This approach works consistently diff --git a/docs/integrate/superset/usage.md b/docs/integrate/superset/usage.md index 7c3b3bc5..76d03ed1 100644 --- a/docs/integrate/superset/usage.md +++ b/docs/integrate/superset/usage.md @@ -38,13 +38,9 @@ superset init ## Start services -Start CrateDB using Docker. +Start CrateDB using Docker or Podman. ```shell -docker run --interactive --rm --pull=always \ - --publish=4200:4200 --publish=5432:5432 \ - --name=cratedb \ - --env CRATE_HEAP_SIZE=1g \ - crate:latest '-Cdiscovery.type=single-node' +docker run --rm --publish=4200:4200 docker.io/crate '-Cdiscovery.type=single-node' ``` Run Superset server. @@ -148,5 +144,5 @@ Superset instance, this ID might be incorrect. ## Clean up 1. The development web server of Apache Superset can be terminated by hitting `CTRL+C`. -2. The CrateDB database instance running in a container can be terminated by either hitting `CTRL+C`, or by invoking `docker rm cratedb --force`. +2. The CrateDB database instance running in a container will be automatically cleaned up due to the `--rm` flag. 3. The metadata database of Apache Superset, where user accounts and database connections are stored, can be deleted by invoking `rm ~/.superset/superset.db`.