Repository navigation
Report Facebook media views as impressions in the rollup - #46
Merged
fivetran-jamie merged 16 commits intoNov 24, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…timestamp Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fivetran-jamie
marked this pull request as ready for review
November 23, 2026 15:05
fivetran-jamie
commented
Nov 23, 2026
| @@ -1,6 +1,6 @@ | |||
| packages: | |||
| - git: https://github.com/fivetran/dbt_facebook_pages.git | |||
| revision: magicbot/fy27-updates | |||
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fivetran-catfritz
left a comment
Contributor
There was a problem hiding this comment.
Couple qs.
Do we need to add these to quickstart.yml?
table_variables:
facebook_pages__using_lifetime_post_metrics_by_paid_organic:
- lifetime_post_metrics_by_paid_organic
facebook_pages__using_lifetime_post_metrics_by_followers:
- lifetime_post_metrics_by_followers
facebook_pages__using_daily_page_metrics_by_paid_organic:
- daily_page_metrics_by_paid_organic
Otherwise looks good to me!
| 'facebook' as platform, | ||
| coalesce(sum(clicks),0) as clicks, | ||
| coalesce(sum(impressions),0) as impressions, -- Deprecated as of November, 2025. Will be removed in future release. | ||
| coalesce(sum(media_views),0) as impressions, |
Contributor
There was a problem hiding this comment.
media_views is a float (post_media_view is FLOAT64), so Facebook impressions changes from an integer to a float here. Because union_relations takes the type from the first model it unions, the rollup's impressions becomes a float when Twitter is disabled. Should we cast it, e.g. cast(coalesce(sum(media_views), 0) as {{ dbt.type_bigint() }})?
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
media_views is a float upstream. union_relations takes each column's type from the first model it unions, so with Twitter disabled the rollup's impressions became a float for every platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fivetran-catfritz
approved these changes
Nov 24, 2026
Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com>
fivetran-catfritz
added a commit
that referenced
this pull request
Nov 24, 2026
* fix/update_column_descriptions Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix/update_column_descriptions Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * FY2027 updates * Add uniqueness tests to staging and end models Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add uniqueness tests to the .changes entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update dbt versions * Update dbt versions * Fix the version bump and .changes entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep only customer-facing entries in the .changes file Moves the column documentation entry out of CHANGELOG.md so the docs:ready pipeline writes the changelog once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Update CHANGELOG * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Standardize the column documentation changelog entry Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Point upstream packages at their FY27 branches packages.yml uses the upstream magicbot/fy27-updates branches until those releases are published; the future hub ranges are left as comments. The README and .changes list the new ranges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use data_tests consistently and mark the dbt minimum as breaking Renames the remaining `tests:` keys to `data_tests:` so the yml no longer mixes the two, and marks the dbt v1.10.0 minimum as a breaking change in the .changes entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Make analytics-solutions the code owner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Report Facebook media views as impressions in the rollup (#46) * Report Facebook media views as impressions in the rollup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use schema_data_changes format in changelog entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep Facebook Pages on the 1.4.x range Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add seeds for the new Facebook Pages media view tables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop UTC suffix from new Facebook seed timestamps so Postgres infers timestamp Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Document Facebook media views as impressions in DECISIONLOG Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Release the Facebook media views change in v1.7.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Add Facebook Pages media view table variables to Quickstart and README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove Facebook Pages media view table section from README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cast Facebook impressions to bigint so the rollup keeps an integer type media_views is a float upstream. union_relations takes each column's type from the first model it unions, so with Twitter disabled the rollup's impressions became a float for every platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Generate dbt docs and update CHANGELOG.md via GitHub Actions * Update README.md Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fivetran-data-model-bot <fivetran-data-model-bot@users.noreply.github.com> Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> * Point packages.yml at the published hub releases Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Savage Fivetran <sarah.savage@fivetran.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: fivetran-data-model-bot <fivetran-data-model-bot@users.noreply.github.com> Co-authored-by: Doug Beatty <doug.beatty@dbtlabs.com> Co-authored-by: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Overview
Package version introduced in this PR:
This PR addresses the following Issue/Feature(s):
Summary of changes:
social_media_reporting__rollup_reportnow report Facebook media views inimpressions, because Facebook deprecated impressions metrics on November 15, 2025. Requires Facebook Pages v1.4.0, which now includes the media view changes from Add media view breakdowns from new Facebook Pages tables dbt_facebook_pages#37. The[">=1.4.0", "<1.5.0"]range from FY2027 updates #45 already picks it up.lifetime_post_metrics_by_paid_organic,lifetime_post_metrics_by_followers,daily_page_metrics_by_paid_organic), copied from dbt_facebook_pages.main.Before merge:
packages.ymlpoints Facebook Pages at the git branchfeature/media-views-breakdowns(fivetran/dbt_facebook_pages#37). Switch it to the hub range[">=1.4.0", "<1.5.0"]once Facebook Pages v1.4.0 is released.Known limitation (out of scope): Facebook comments and shares stay unpopulated in the rollup.
Submission Checklist
singular-vector-135519.luke_facebook_pages. Facebook rows (most recent record per post): 205 of 364 posts now haveimpressionsabove 0, total 9,145. Before this change: 3 posts, total 8.models/intermediate/social_media_reporting__facebook_posts_reporting.sqlChangelog
.changes/1.7.0.yml)🤖 Generated with Claude Code