Skip to content

Join geo on its own source_relation in the country and region reports - #67

Merged
fivetran-catfritz merged 1 commit into
fivetran:bugfix/geo-source-relation-joinfrom
porkedchop:geo-source-relation-join
Oct 19, 2026
Merged

fivetran-catfritz merged 1 commit into
fivetran:bugfix/geo-source-relation-joinfrom
porkedchop:geo-source-relation-join

Conversation

@porkedchop

Copy link
Copy Markdown
Contributor

Resolves #66

Please provide your name and company

Bishop Kammeraad

Describe what this PR changes and how it addresses the linked issue or feature request.

Fixes the geo join in linkedin_ads__monthly_campaign_country_report and linkedin_ads__monthly_campaign_region_report to compare geo.source_relation with report.source_relation instead of report.source_relation with itself.

How did you validate the changes introduced within this PR, and what warehouse did you use for testing?

DuckDB. Unioned two schemas of the integration test data: region report cost per source_relation goes from 3534.0 to 1767.0, matching the staging report. dbt build passes on the package seeds.

@fivetran-catfritz
fivetran-catfritz changed the base branch from main to MagicBot/fix-geo-source-relation-join October 19, 2026 19:52
@fivetran-catfritz
fivetran-catfritz changed the base branch from MagicBot/fix-geo-source-relation-join to bugfix/geo-source-relation-join October 19, 2026 19:59
@fivetran-catfritz
fivetran-catfritz merged commit d67e86d into fivetran:bugfix/geo-source-relation-join Oct 19, 2026

@fivetran-avinash fivetran-avinash 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.

fivetran-catfritz added a commit that referenced this pull request Oct 19, 2026
#68)

* Join geo on its own source_relation in the country and region reports (#67)

* Bump to v1.3.2, add geo integrity test, fix country seed geo IDs

- Bump package version to 1.3.2 and add CHANGELOG entry for the geo join fix.
- Add vertical_sum_monthly_geo_reports_by_source integrity test that compares staging and end model totals per source_relation.
- Update country seed member_country values to match the geo seed so the country report join is exercised.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Delete integration_tests/tests/integrity/vertical_sum_monthly_geo_reports_by_source.sql

* Simplify v1.3.2 CHANGELOG entry to focus on impact

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Remove deleted integrity test from CHANGELOG

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Generate dbt docs via GitHub Actions

* Update CHANGELOG.md

---------

Co-authored-by: Bishop Kammeraad <113325736+porkedchop@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: fivetran-data-model-bot <fivetran-data-model-bot@users.noreply.github.com>
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.

Country and region reports multiply metrics when several LinkedIn connections are unioned

3 participants