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:
Michael 2023-10-30 09:02:12 +01:00 committed by GitHub
parent bd9e98a3a6
commit 7ec04f8dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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");
```