Skip to content

Commit

Permalink
Peerdb stats: add source and dest table info for qrep run (#1540)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Philip Dubé <[email protected]>
  • Loading branch information
3 people authored Mar 26, 2024
1 parent a0ad8a4 commit c628a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/connectors/utils/monitoring/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c628a2c

Please sign in to comment.