Skip to content

Commit

Permalink
added tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Oct 31, 2023
1 parent 6d0ec29 commit fdcfb91
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 84 deletions.
5 changes: 1 addition & 4 deletions sql/20230915101223_events.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ CREATE TABLE IF NOT EXISTS events (
Event String,
FirstTime String,
LastTime String
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915101317_rakkess.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ CREATE TABLE IF NOT EXISTS rakkess (
List String,
Update String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 10 MINUTE
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);

5 changes: 1 addition & 4 deletions sql/20230915101358_DeprecatedAPIs.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ CREATE TABLE IF NOT EXISTS DeprecatedAPIs (
Deprecated UInt8,
Scope String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);

5 changes: 1 addition & 4 deletions sql/20230915101437_DeletedAPIs.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ CREATE TABLE IF NOT EXISTS DeletedAPIs (
Deleted UInt8,
Scope String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);

5 changes: 1 addition & 4 deletions sql/20230915101512_jfrogcontainerpush.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ CREATE TABLE IF NOT EXISTS jfrogcontainerpush (
Tag String,
Event String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);

5 changes: 1 addition & 4 deletions sql/20230915101549_getall_resources.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ CREATE TABLE IF NOT EXISTS getall_resources (
Resource String,
Age String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915101643_outdated_images.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS outdated_images (
LatestVersion String,
VersionsBehind Int64,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915101736_kubescore.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ CREATE TABLE IF NOT EXISTS kubescore (
cluster_name String,
recommendations String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
6 changes: 1 addition & 5 deletions sql/20230915101811_trivy_vul.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ CREATE TABLE IF NOT EXISTS trivy_vul (
vul_severity String,
vul_published_date DateTime('UTC'),
vul_last_modified_date DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
`
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915101844_trivy_misconfig.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ CREATE TABLE IF NOT EXISTS trivy_misconfig (
misconfig_severity String,
misconfig_status String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
6 changes: 1 addition & 5 deletions sql/20230915101910_trivyimage.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ CREATE TABLE IF NOT EXISTS trivyimage (
vul_severity String,
vul_published_date DateTime('UTC'),
vul_last_modified_date DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, vul_last_modified_date)
TTL vul_last_modified_date + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
`
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102122_dockerhubbuild.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ CREATE TABLE IF NOT EXISTS dockerhubbuild (
Owner String,
Event String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102157_azurecontainerpush.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS azurecontainerpush (
Size Int32,
SHAID String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102229_quaycontainerpush.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS quaycontainerpush (
tag String,
Event String,
EventTime DateTime('UTC')
) ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102314_trivysbom.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ CREATE TABLE IF NOT EXISTS trivysbom (
component_license_exp String,
component_purl String,
dependency_ref String
) ENGINE = MergeTree()
ORDER BY (ClusterName, metadata_timestamp)
TTL metadata_timestamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102348_azure_devops.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS azure_devops (
RepoName String,
TimeStamp DateTime('UTC'),
Event String
) ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102437_github.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS github (
RepoName String,
TimeStamp DateTime('UTC'),
Event String
) ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102739_gitlab.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS gitlab (
RepoName String,
TimeStamp DateTime('UTC'),
Event String
) ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102817_bitbucket.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS bitbucket (
RepoName String,
TimeStamp DateTime('UTC'),
Event String
) ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
5 changes: 1 addition & 4 deletions sql/20230915102843_gitea.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ CREATE TABLE IF NOT EXISTS gitea (
RepoName String,
TimeStamp DateTime('UTC'),
Event String
) ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
) engine=File(TabSeparated);
4 changes: 2 additions & 2 deletions sql/20231031125103_update_DeprecatedAPIs.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ALTER TABLE DeprecatedAPIs
ENGINE = MergeTree()
ORDER BY (ClusterName, TimeStamp)
TTL TimeStamp + INTERVAL 30 DAY
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;

0 comments on commit fdcfb91

Please sign in to comment.