Last active
April 12, 2020 06:39
-
-
Save chrismckelt/f4e73f67a6903a1f4a0446065fdc6e78 to your computer and use it in GitHub Desktop.
TimescaleDB.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS table_001 | |
( | |
"Timestamp" timestamp with time zone not null, | |
IsAirConditionerOn smallint not null, | |
Temperature decimal not null, | |
tagkey varchar not null | |
); | |
ALTER TABLE table_001 OWNER TO postgres; | |
SELECT create_hypertable ('table_001', 'Timestamp'); | |
-- Grafana access | |
CREATE USER grafana WITH PASSWORD 'YOUR_PASSWORD' CREATEDB; | |
CREATE DATABASE grafana OWNER grafana; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment