Skip to content

Commit

Permalink
added tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Nov 1, 2023
1 parent 84250fa commit 26f68d1
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions sql/20231031110543_update_event.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ CREATE TABLE IF NOT EXISTS new_events (
Event String,
FirstTime String,
LastTime String
) CREATE TABLE IF NOT EXISTS new_events (
ClusterName String,
Id String,
EventTime DateTime('UTC'),
OpType String,
Name String,
Namespace String,
Kind String,
Message String,
Reason String,
Host String,
Event String,
FirstTime String,
LastTime String
) ENGINE = MergeTree()
ORDER BY ClusterName, EventTime;
ORDER BY ClusterName, EventTime
TTL EventTime + INTERVAL 30 DAY;

TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

INSERT INTO new_events SELECT * FROM events;

Expand Down

0 comments on commit 26f68d1

Please sign in to comment.