Skip to content

Add per-provenance counters to dataflow and spanner#658

Open
vish-cs wants to merge 2 commits into
datacommonsorg:masterfrom
vish-cs:count
Open

Add per-provenance counters to dataflow and spanner#658
vish-cs wants to merge 2 commits into
datacommonsorg:masterfrom
vish-cs:count

Conversation

@vish-cs

@vish-cs vish-cs commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

codacy-production Bot commented Jul 17, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 16 complexity

Metric Results
Complexity 16

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the ingestion pipeline to track metrics (node, edge, observation, and time series counts) on a per-import basis by suffixing counter names with the import name. It also introduces a get_import_counts method in the Spanner client to query these counts directly from Spanner when they are not provided in the metrics, and updates the version history tables accordingly. The feedback highlights a logical issue in update_version_history where Spanner is not queried if metrics are only partially populated, suggests qualifying the provenance column in a SQL JOIN query to prevent ambiguity, and recommends filtering metrics by the specific import name suffix in get_ingestion_metrics to avoid incorrect aggregation across different imports.

Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py Outdated
Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py Outdated
Comment thread pipeline/workflow/ingestion-helper/utils/imports.py Outdated
Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py Outdated
Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py Outdated
Comment thread pipeline/workflow/ingestion-helper/utils/imports.py Outdated
Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py Outdated

@gmechali gmechali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet thank you Vishal, have you tested this and deployed it via DCP as well to ensure it doesnt' break?

@vish-cs
vish-cs enabled auto-merge (squash) July 21, 2026 15:44
@vish-cs
vish-cs disabled auto-merge July 21, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants