Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clickhouse): Fix clickhouse strings #1680

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def change
transaction_id,
toDateTime64(timestamp, 3) as timestamp,
code,
cast(JSONExtractKeysAndValuesRaw(properties), 'Map(String, String)') as properties
JSONExtract(properties, 'Map(String, String)') as properties
FROM events_raw_queue
SQL

Expand Down
4 changes: 2 additions & 2 deletions db/clickhouse_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
end

# TABLE: events_raw_mv
# SQL: CREATE MATERIALIZED VIEW default.events_raw_mv TO default.events_raw ( `organization_id` String, `external_customer_id` String, `external_subscription_id` String, `transaction_id` String, `timestamp` DateTime64(3), `code` String, `properties` Map(String, String) ) AS SELECT organization_id, external_customer_id, external_subscription_id, transaction_id, toDateTime64(timestamp, 3) AS timestamp, code, CAST(JSONExtractKeysAndValuesRaw(properties), 'Map(String, String)') AS properties FROM default.events_raw_queue
create_table "events_raw_mv", view: true, materialized: true, id: false, as: "SELECT organization_id, external_customer_id, external_subscription_id, transaction_id, toDateTime64(timestamp, 3) AS timestamp, code, CAST(JSONExtractKeysAndValuesRaw(properties), 'Map(String, String)') AS properties FROM default.events_raw_queue", force: :cascade do |t|
# SQL: CREATE MATERIALIZED VIEW default.events_raw_mv TO default.events_raw ( `organization_id` String, `external_customer_id` String, `external_subscription_id` String, `transaction_id` String, `timestamp` DateTime64(3), `code` String, `properties` Map(String, String) ) AS SELECT organization_id, external_customer_id, external_subscription_id, transaction_id, toDateTime64(timestamp, 3) AS timestamp, code, JSONExtract(properties, 'Map(String, String)') AS properties FROM default.events_raw_queue
create_table "events_raw_mv", view: true, materialized: true, id: false, as: "SELECT organization_id, external_customer_id, external_subscription_id, transaction_id, toDateTime64(timestamp, 3) AS timestamp, code, JSONExtract(properties, 'Map(String, String)') AS properties FROM default.events_raw_queue", force: :cascade do |t|
end

end
Loading