Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(analytics): add card_network as a field in payment_attempts clickhouse table (#5807)

Sandeep Kumarbf1797fe7cf7
diff --git a/crates/analytics/docs/clickhouse/scripts/payment_attempts.sql b/crates/analytics/docs/clickhouse/scripts/payment_attempts.sql
index 5c1ee8754c..f5d0ca51fd 100644
--- a/crates/analytics/docs/clickhouse/scripts/payment_attempts.sql
+++ b/crates/analytics/docs/clickhouse/scripts/payment_attempts.sql
@@ -42,6 +42,7 @@ CREATE TABLE payment_attempt_queue (
`client_version` LowCardinality(Nullable(String)),
`organization_id` String,
`profile_id` String,
+ `card_network` Nullable(String),
`sign_flag` Int8
) ENGINE = Kafka SETTINGS kafka_broker_list = 'kafka0:29092',
kafka_topic_list = 'hyperswitch-payment-attempt-events',
@@ -94,6 +95,7 @@ CREATE TABLE payment_attempts (
`client_version` LowCardinality(Nullable(String)),
`organization_id` String,
`profile_id` String,
+ `card_network` Nullable(String),
`sign_flag` Int8,
INDEX connectorIndex connector TYPE bloom_filter GRANULARITY 1,
INDEX paymentMethodIndex payment_method TYPE bloom_filter GRANULARITY 1,
@@ -149,6 +151,7 @@ CREATE MATERIALIZED VIEW payment_attempt_mv TO payment_attempts (
`client_version` LowCardinality(Nullable(String)),
`organization_id` String,
`profile_id` String,
+ `card_network` Nullable(String),
`sign_flag` Int8
) AS
SELECT
@@ -196,8 +199,9 @@ SELECT
client_version,
organization_id,
profile_id,
+ card_network,
sign_flag
FROM
payment_attempt_queue
WHERE
- length(_error) = 0;
\ No newline at end of file
+ length(_error) = 0;