Skip to content

Adds new view_grants_analysis_view sql to tools - #351

Open
jwilson232 wants to merge 3 commits into
livefrom
jw/view-latest-grant-fix
Open

jwilson232 wants to merge 3 commits into
livefrom
jw/view-latest-grant-fix

Conversation

@jwilson232

@jwilson232 jwilson232 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor
  • view_latest_grant.sql was out of date with production, this pr catches up the checked copy to match the live definition
  • adds view_grants_analysis_view.sql, a new tracked view for the flattened grants analysis

@jwilson232
jwilson232 force-pushed the jw/view-latest-grant-fix branch from ff2ce2e to 0e03231 Compare October 7, 2026 13:32
@jwilson232
jwilson232 force-pushed the jw/view-latest-grant-fix branch from 0e03231 to bab5756 Compare October 7, 2026 13:33
@jwilson232 jwilson232 changed the title tools: updates view latest grant to alias publisher id Adds new view_grants_analysis_view sql to tools Oct 7, 2026
@ruth360Giving
ruth360Giving requested a review from drkane October 8, 2026 13:36
LEFT JOIN (SELECT
org_id,
name,
unnest(array_append(non_primary_org_ids, org_id)) AS all_ids

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.

My only worry with this is that we could end up with duplicate grants, in a case that two funders have the same org_id in the non_primary_org_ids field. Not sure if this would actually happen in practice but if it did then there would be duplicate grants.

I checked and this doesn't happen at the moment, so I don't think this should block the merge for now.

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