From c628a2ccd445acd70bb93f15433adb0c5f40ce71 Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Wed, 27 Mar 2024 01:44:48 +0530 Subject: [PATCH] Peerdb stats: add source and dest table info for qrep run (#1540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Populates two columns in `qrep_runs` table: source (watermark) table and destination table. These columns are not relevant currently but this is just useful info in general and we can show it in UI too in a follow up PR without having to decode the config Co-authored-by: Kaushik Iska Co-authored-by: Philip Dubé --- flow/connectors/utils/monitoring/monitoring.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/connectors/utils/monitoring/monitoring.go b/flow/connectors/utils/monitoring/monitoring.go index a402968544..2adf240430 100644 --- a/flow/connectors/utils/monitoring/monitoring.go +++ b/flow/connectors/utils/monitoring/monitoring.go @@ -152,8 +152,8 @@ func InitializeQRepRun( ) error { flowJobName := config.GetFlowJobName() _, err := pool.Exec(ctx, - "INSERT INTO peerdb_stats.qrep_runs(flow_name,run_uuid) VALUES($1,$2) ON CONFLICT DO NOTHING", - flowJobName, runUUID) + "INSERT INTO peerdb_stats.qrep_runs(flow_name,run_uuid,source_table,destination_table) VALUES($1,$2,$3,$4) ON CONFLICT DO NOTHING", + flowJobName, runUUID, config.WatermarkTable, config.DestinationTableIdentifier) if err != nil { return fmt.Errorf("error while inserting qrep run in qrep_runs: %w", err) }