Skip to content

Add per-provenance counters to dataflow and spanner - #658

Merged
vish-cs merged 2 commits into
datacommonsorg:masterfrom
vish-cs:count
Jul 28, 2026
Merged

Add per-provenance counters to dataflow and spanner#658
vish-cs merged 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 13 complexity

Metric Results
Complexity 13

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
@vish-cs
vish-cs force-pushed the count branch 2 times, most recently from 44fe8aa to dbd4759 Compare July 28, 2026 05:04
@vish-cs
vish-cs merged commit af33c21 into datacommonsorg:master Jul 28, 2026
11 checks passed
vish-cs added a commit to vish-cs/import that referenced this pull request Jul 28, 2026
vish-cs added a commit that referenced this pull request Jul 28, 2026
…694)

Reverting commit af33c21 to allow DCP
rollout. Will resubmit afterwards.
vish-cs added a commit that referenced this pull request Jul 30, 2026
Revert PR #694 and reapply per-provenance counters #658

This reverts commit e282635.
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