Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/integrate/dapr/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 '{
Expand All @@ -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 <schema name>.<table name> VALUES (NOW(), 123, \'some string...\')"
"sql": "INSERT INTO <schema name>.<table name> 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 '{
Expand Down
21 changes: 20 additions & 1 deletion docs/integrate/influxdb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 0 additions & 28 deletions docs/integrate/influxdb/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions docs/integrate/superset/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`.
Loading