docs(outputs.cratedb): Correct required SQL table schema (#13934)
Co-authored-by: Joshua Powers <powersj@fastmail.com> Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
This commit is contained in:
parent
bd9e98a3a6
commit
7ec04f8dd6
|
|
@ -8,12 +8,13 @@ protocol](https://crate.io/docs/crate/reference/protocols/postgres.html).
|
|||
The plugin requires a table with the following schema.
|
||||
|
||||
```sql
|
||||
CREATE TABLE my_metrics (
|
||||
CREATE TABLE IF NOT EXISTS my_metrics (
|
||||
"hash_id" LONG INDEX OFF,
|
||||
"timestamp" TIMESTAMP,
|
||||
"name" STRING,
|
||||
"tags" OBJECT(DYNAMIC),
|
||||
"fields" OBJECT(DYNAMIC),
|
||||
"day" TIMESTAMP GENERATED ALWAYS AS date_trunc('day', "timestamp"),
|
||||
PRIMARY KEY ("timestamp", "hash_id","day")
|
||||
) PARTITIONED BY("day");
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue