Repository navigation
Report Facebook media views as impressions in the rollup #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fivetran-jamie
merged 16 commits into
magicbot/fy27-updates
from
feature/facebook-media-views
Nov 24, 2026
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
eaf7ddd
Report Facebook media views as impressions in the rollup
fivetran-jamie b080d95
Use schema_data_changes format in changelog entry
fivetran-jamie 49f0c2e
Keep Facebook Pages on the 1.4.x range
fivetran-jamie 0292a47
Add seeds for the new Facebook Pages media view tables
fivetran-jamie efb939f
Drop UTC suffix from new Facebook seed timestamps so Postgres infers …
fivetran-jamie 06139c5
Generate dbt docs and update CHANGELOG.md via GitHub Actions
fivetran-data-model-bot 466e62e
Document Facebook media views as impressions in DECISIONLOG
fivetran-jamie a9beb74
Generate dbt docs and update CHANGELOG.md via GitHub Actions
fivetran-data-model-bot c0b24e1
Release the Facebook media views change in v1.7.0
fivetran-jamie a419eb0
Generate dbt docs and update CHANGELOG.md via GitHub Actions
fivetran-data-model-bot ab06380
Add Facebook Pages media view table variables to Quickstart and README
fivetran-jamie e386bf3
Remove Facebook Pages media view table section from README
fivetran-jamie eccb745
Cast Facebook impressions to bigint so the rollup keeps an integer type
fivetran-jamie 9c6567c
Generate dbt docs and update CHANGELOG.md via GitHub Actions
fivetran-data-model-bot 2056bd6
Generate dbt docs and update CHANGELOG.md via GitHub Actions
fivetran-data-model-bot f0a801a
Update README.md
fivetran-jamie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
integration_tests/seeds/facebook_pages_daily_page_metrics_by_paid_organic_data.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| date,is_from_ads,page_id,page_media_view,_fivetran_synced | ||
| 2020-04-09 07:00:00,true,514435155248879,2,2021-09-09 15:05:33.416 | ||
| 2020-04-09 07:00:00,false,514435155248879,4,2021-09-09 15:05:33.416 | ||
| 2020-04-10 07:00:00,true,514435155248879,0,2021-09-09 15:05:33.416 | ||
| 2020-04-10 07:00:00,false,514435155248879,1,2021-09-09 15:05:33.416 | ||
| 2020-04-11 07:00:00,true,514435155248879,1,2021-09-09 15:05:33.416 | ||
| 2020-04-11 07:00:00,false,514435155248879,4,2021-09-09 15:05:33.416 |
19 changes: 19 additions & 0 deletions
19
integration_tests/seeds/facebook_pages_lifetime_post_metrics_by_followers_data.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| date,is_from_followers,post_id,post_media_view,_fivetran_synced | ||
| 2021-09-11 07:00:00,true,125386894179471_4458643047520479,5,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,125386894179471_4458643047520479,2,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,125386894179471_4458643047520479,3,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,125386894179471_4458643047520479,1,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,125386894179471_4458643047520479,2,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,125386894179471_4458643047520479,1,2021-09-13 20:22:54.514 | ||
| 2021-09-11 07:00:00,true,514435155248879_2172221929470185,3,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,514435155248879_2172221929470185,2,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,514435155248879_2172221929470185,1,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,514435155248879_2172221929470185,1,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,514435155248879_2172221929470185,0,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,514435155248879_2172221929470185,1,2021-09-13 20:22:54.514 | ||
| 2021-09-11 07:00:00,true,514435155248879_3391309130894786,0,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,514435155248879_3391309130894786,2,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,514435155248879_3391309130894786,4,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,514435155248879_3391309130894786,1,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,514435155248879_3391309130894786,3,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,514435155248879_3391309130894786,1,2021-09-13 20:22:54.514 |
19 changes: 19 additions & 0 deletions
19
integration_tests/seeds/facebook_pages_lifetime_post_metrics_by_paid_organic_data.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| date,is_from_ads,post_id,post_media_view,_fivetran_synced | ||
| 2021-09-11 07:00:00,true,125386894179471_4458643047520479,3,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,125386894179471_4458643047520479,3,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,125386894179471_4458643047520479,2,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,125386894179471_4458643047520479,2,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,125386894179471_4458643047520479,1,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,125386894179471_4458643047520479,2,2021-09-13 20:22:54.514 | ||
| 2021-09-11 07:00:00,true,514435155248879_2172221929470185,2,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,514435155248879_2172221929470185,2,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,514435155248879_2172221929470185,1,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,514435155248879_2172221929470185,1,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,514435155248879_2172221929470185,0,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,514435155248879_2172221929470185,1,2021-09-13 20:22:54.514 | ||
| 2021-09-11 07:00:00,true,514435155248879_3391309130894786,0,2021-09-11 20:22:30.012 | ||
| 2021-09-11 07:00:00,false,514435155248879_3391309130894786,1,2021-09-11 20:22:30.012 | ||
| 2021-09-12 07:00:00,true,514435155248879_3391309130894786,2,2021-09-12 20:23:37.593 | ||
| 2021-09-12 07:00:00,false,514435155248879_3391309130894786,3,2021-09-12 20:23:37.593 | ||
| 2021-09-13 07:00:00,true,514435155248879_3391309130894786,2,2021-09-13 20:22:54.514 | ||
| 2021-09-13 07:00:00,false,514435155248879_3391309130894786,2,2021-09-13 20:22:54.514 |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| packages: | ||
| - git: https://github.com/fivetran/dbt_facebook_pages.git | ||
| revision: magicbot/fy27-updates | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switch |
||
| revision: feature/media-views-breakdowns | ||
| # Switch back to the hub release once dbt_facebook_pages 1.4.0 is published: | ||
| # - package: fivetran/facebook_pages | ||
| # version: [">=1.4.0", "<1.5.0"] | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
media_viewsis a float (post_media_viewisFLOAT64), so Facebookimpressionschanges from an integer to a float here. Becauseunion_relationstakes the type from the first model it unions, the rollup'simpressionsbecomes a float when Twitter is disabled. Should we cast it, e.g.cast(coalesce(sum(media_views), 0) as {{ dbt.type_bigint() }})?