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(ckh-payout-scripts): fix ckh payout column types #4369

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/analytics/docs/clickhouse/scripts/payouts.sql
Expand Up @@ -25,7 +25,7 @@ CREATE TABLE payout_queue (
`is_eligible` Nullable(Bool),
`error_message` Nullable(String),
`error_code` Nullable(String),
`business_country` Nullable(LowCardinality(String)),
`business_country` LowCardinality(Nullable(String)),
`business_label` Nullable(String),
`merchant_connector_id` Nullable(String),
`sign_flag` Int8
Expand All @@ -42,7 +42,7 @@ CREATE TABLE payout (
`customer_id` String,
`address_id` String,
`profile_id` String,
`payout_method_id` String,
`payout_method_id` Nullable(String),
`payout_type` LowCardinality(String),
`amount` UInt64,
`destination_currency` LowCardinality(String),
Expand All @@ -62,7 +62,7 @@ CREATE TABLE payout (
`is_eligible` Nullable(Bool),
`error_message` Nullable(String),
`error_code` Nullable(String),
`business_country` Nullable(LowCardinality(String)),
`business_country` LowCardinality(Nullable(String)),
`business_label` Nullable(String),
`merchant_connector_id` Nullable(String),
`inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4),
Expand All @@ -77,14 +77,14 @@ CREATE TABLE payout (
ORDER BY
(created_at, merchant_id, payout_id) TTL created_at + toIntervalMonth(6);

CREATE MATERIALIZED VIEW kafka_parse_payout TO payout (
CREATE MATERIALIZED VIEW payout_mv TO payout (
`payout_id` String,
`payout_attempt_id` String,
`merchant_id` String,
`customer_id` String,
`address_id` String,
`profile_id` String,
`payout_method_id` String,
`payout_method_id` Nullable(String),
`payout_type` LowCardinality(String),
`amount` UInt64,
`destination_currency` LowCardinality(String),
Expand All @@ -104,7 +104,7 @@ CREATE MATERIALIZED VIEW kafka_parse_payout TO payout (
`is_eligible` Nullable(Bool),
`error_message` Nullable(String),
`error_code` Nullable(String),
`business_country` Nullable(LowCardinality(String)),
`business_country` LowCardinality(Nullable(String)),
`business_label` Nullable(String),
`merchant_connector_id` Nullable(String),
`inserted_at` DateTime64(3),
Expand Down