Skip to content

Instantly share code, notes, and snippets.

@chaudum
Created November 7, 2017 15:35
Show Gist options
  • Save chaudum/0409973c09d5d8677865e3457f4e305f to your computer and use it in GitHub Desktop.
Save chaudum/0409973c09d5d8677865e3457f4e305f to your computer and use it in GitHub Desktop.
CREATE TABLE "mqtt"."raw" (
"client_id" STRING,
"packet_id" INTEGER,
"topic" STRING,
"ts" TIMESTAMP,
"payload" OBJECT(ignored),
"day__generated" TIMESTAMP GENERATED ALWAYS AS date_trunc('day', ts)
) PARTITIONED BY ("day__generated");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment