Skip to content

Commit

Permalink
Update query snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 22, 2023
1 parent 1c1e22e commit e953b19
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions posthog/clickhouse/test/__snapshots__/test_schema.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,23 @@

'
---
# name: test_create_kafka_table_with_different_kafka_host[kafka_log_entries]
'

CREATE TABLE IF NOT EXISTS kafka_log_entries ON CLUSTER 'posthog'
(
team_id UInt64,
log_source LowCardinality(String),
log_source_id VARCHAR,
instance_id VARCHAR,
timestamp DateTime64(6, 'UTC'),
level LowCardinality(String),
message VARCHAR

) ENGINE = Kafka('test.kafka.broker:9092', 'log_entries_test', 'group1', 'JSONEachRow')

'
---
# name: test_create_kafka_table_with_different_kafka_host[kafka_performance_events]
'

Expand Down Expand Up @@ -733,6 +750,23 @@

'
---
# name: test_create_table_query[kafka_log_entries]
'

CREATE TABLE IF NOT EXISTS kafka_log_entries ON CLUSTER 'posthog'
(
team_id UInt64,
log_source LowCardinality(String),
log_source_id VARCHAR,
instance_id VARCHAR,
timestamp DateTime64(6, 'UTC'),
level LowCardinality(String),
message VARCHAR

) ENGINE = Kafka('kafka:9092', 'log_entries_test', 'group1', 'JSONEachRow')

'
---
# name: test_create_table_query[kafka_performance_events]
'

Expand Down Expand Up @@ -931,6 +965,48 @@

'
---
# name: test_create_table_query[log_entries]
'

CREATE TABLE IF NOT EXISTS log_entries ON CLUSTER 'posthog'
(
team_id UInt64,
log_source LowCardinality(String),
log_source_id VARCHAR,
instance_id VARCHAR,
timestamp DateTime64(6, 'UTC'),
level LowCardinality(String),
message VARCHAR

, _timestamp DateTime
, _offset UInt64

) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/77f1df52-4b43-11e9-910f-b8ca3a9b9f3e_noshard/posthog.log_entries', '{replica}-{shard}', _timestamp)
ORDER BY (team_id, log_source, log_source_id, instance_id, timestamp)

SETTINGS index_granularity=512

'
---
# name: test_create_table_query[log_entries_mv]
'

CREATE MATERIALIZED VIEW IF NOT EXISTS log_entries_mv ON CLUSTER 'posthog'
TO posthog_test.log_entries
AS SELECT
team_id,
log_source,
log_source_id,
instance_id,
timestamp,
level,
message,
_timestamp,
_offset
FROM posthog_test.kafka_log_entries

'
---
# name: test_create_table_query[performance_events]
'

Expand Down Expand Up @@ -1841,6 +1917,29 @@

'
---
# name: test_create_table_query_replicated_and_storage[log_entries]
'

CREATE TABLE IF NOT EXISTS log_entries ON CLUSTER 'posthog'
(
team_id UInt64,
log_source LowCardinality(String),
log_source_id VARCHAR,
instance_id VARCHAR,
timestamp DateTime64(6, 'UTC'),
level LowCardinality(String),
message VARCHAR

, _timestamp DateTime
, _offset UInt64

) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/77f1df52-4b43-11e9-910f-b8ca3a9b9f3e_noshard/posthog.log_entries', '{replica}-{shard}', _timestamp)
ORDER BY (team_id, log_source, log_source_id, instance_id, timestamp)

SETTINGS index_granularity=512

'
---
# name: test_create_table_query_replicated_and_storage[person]
'

Expand Down

0 comments on commit e953b19

Please sign in to comment.