Skip to content

feat: add spanner based aggregation framework #531

Draft
rohitkumarbhagat wants to merge 4 commits into
datacommonsorg:masterfrom
rohitkumarbhagat:sg-local-aggregation
Draft

feat: add spanner based aggregation framework #531
rohitkumarbhagat wants to merge 4 commits into
datacommonsorg:masterfrom
rohitkumarbhagat:sg-local-aggregation

Conversation

@rohitkumarbhagat

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

codacy-production Bot commented Jun 8, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 medium · 8 minor

Alerts:
⚠ 10 issues (≤ 0 issues of at least minor severity)

Results:
10 new issues

Category Results
Documentation 8 minor
Security 2 medium

View in Codacy

🟢 Metrics 90 complexity · 2 duplication

Metric Results
Complexity 90
Duplication 2

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 introduces a new data aggregation framework in the ingestion helper, adding utility classes for sources (Spanner SQL and local JSONL), sinks (Spanner table and local JSONL), and an AggregationRunner to execute aggregation specifications. It also integrates a new run_aggregation_spec action into the main Flask application along with comprehensive unit tests. The feedback highlights opportunities to improve robustness, specifically by safely handling potentially None fields in the Spanner source, using .get() to prevent KeyErrors during sink writes, and using getattr to safely retrieve the batch size from sinks to avoid AttributeErrors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pipeline/workflow/ingestion-helper/aggregation_spec_utils.py Outdated
Comment thread pipeline/workflow/ingestion-helper/aggregation_spec_utils.py
Comment thread pipeline/workflow/ingestion-helper/aggregation_spec_utils.py
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.

1 participant