Releases: fivetran/dbt_facebook_ads
v1.4.2 dbt_facebook_ads
PR #67 includes the following updates:
Bug Fix
- Fixes PostgreSQL compatibility issue in
get_url_tags_query()macro wherejsonbcolumns were incorrectly processed usingjson_array_elements()instead ofjsonb_array_elements(), causing database errors whenurl_tagscolumn is stored asjsonbdatatype.
Full Changelog: v1.4.1...v1.4.2
v1.4.1 dbt_facebook_ads
PR #65 includes the following updates:
Bug Fix
- Updates URL tag processing to handle native JSON datatypes across all supported warehouses, preventing errors when
url_tagscolumns are stored as JSON/JSONB/VARIANT/SUPER instead of strings.
Feature Update
- Adds the
get_column_datatype()macro to retrieve the datatype of a specific column. - Updates the
get_url_tags_query()macro with datatype detection to handle both native JSON columns and JSON-like string columns across BigQuery (JSON), Snowflake (VARIANT), Redshift (SUPER), and PostgreSQL (JSONB).
Under the Hood
- Adds native JSON testing to
integration_tests. - Updates the
vertical_sum_conversion_valueintegrity test to validate bothconversions_valueandconversions.
Full Changelog: v1.4.0...v1.4.1
v1.4.0 dbt_facebook_ads
PR #63 includes the following updates:
Documentation
- Updates README with standardized Fivetran formatting.
- Removes duplicative column yml definitions.
Under the Hood
- In the
quickstart.ymlfile:- Adds
table_variablesfor relevant sources to prevent missing sources from blocking downstream Quickstart models. - Adds
supported_varsfor Quickstart UI customization.
- Adds
Full Changelog: v1.3.0...v1.4.0
v1.3.0 dbt_facebook_ads
PR #60 includes the following updates:
Schema/Data Change
10 total changes • 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
| All facebook_ads__*_report models | New Column | onsite_conversion_purchase_conversions |
Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. | |
| All facebook_ads__*_report models | New Column | onsite_conversion_lead_grouped_conversions |
Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. | |
| All facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_purchase_conversions |
Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. | |
| All facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_lead_conversions |
Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. | |
| All facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_custom_conversions |
Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. | |
| All non-geographical facebook_ads__*_report models | New Column | onsite_conversion_purchase_conversions_value |
Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. | |
| All non-geographical facebook_ads__*_report models | New Column | onsite_conversion_lead_grouped_conversions_value |
Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. | |
| All non-geographical facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_purchase_conversions_value |
Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. | |
| All non-geographical facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_lead_conversions_value |
Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. | |
| All non-geographical facebook_ads__*_report models | New Column | offsite_conversion_fb_pixel_custom_conversions_value |
Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. |
The default action types included are onsite_conversion.purchase, onsite_conversion.lead_grouped, offsite_conversion.fb_pixel_purchase, offsite_conversion.fb_pixel_lead, and offsite_conversion.fb_pixel_custom. You can add additional custom action types by configuring the facebook_ads__conversion_action_types variable. See the README for details on how to configure custom action types.
Under the Hood
- Adds
facebook_action_slugmacro to generate slugified column names from action type configurations.
Full Changelog: v1.2.0...v1.3.0
v1.2.0 dbt_facebook_ads
PR #59 includes the following updates:
Features
- Increases the required dbt version upper limit to v3.0.0
Full Changelog: v1.1.0...v1.2.0
v1.1.0 dbt_facebook_ads
PR #57 includes the following updates:
Schema Updates
4 total changes • 0 possible breaking changes
| Data Model | Change type | Old name | New name | Notes |
|---|---|---|---|---|
| stg_facebook_ads__basic_ad_action_values | New Columns | index, _fivetran_id |
Adding composite fields for primary keys for basic_ad_action_values source table. |
|
| stg_facebook_ads__basic_ad_actions | New Columns | index, _fivetran_id |
Adding composite fields for primary keys for basic_ad_actions source table. |
|
| stg_facebook_ads__demographics_country_actions | New Column | index |
Adding composite field for primary key for demographics_country_actions source table. |
|
| stg_facebook_ads__demographics_region_actions | New Column | index |
Adding composite field for primary key for demographics_region_actions source table. |
Documentation
- Updated
fivetran_idandindexdefinitions to highlight importance in determining Fivetran key.
Under the Hood
- Removed second reviewer workflow, as it's not longer being implemented.
Full Changelog: v1.0.0...v1.1.0
v1.0.0 dbt_facebook_ads
PR #56 includes the following updates:
Breaking Changes
Source Package Consolidation
- Removed the dependency on the
fivetran/facebook_ads_sourcepackage.- All functionality from the source package has been merged into this transformation package for improved maintainability and clarity.
- If you reference
fivetran/facebook_ads_sourcein yourpackages.yml, you must remove this dependency to avoid conflicts. - Any source overrides referencing the
fivetran/facebook_ads_sourcepackage will also need to be removed or updated to reference this package. - Update any facebook_ads_source-scoped variables to be scoped to only under this package. See the README for how to configure the build schema of staging models.
- As part of the consolidation, vars are no longer used to reference staging models, and only sources are represented by vars. Staging models are now referenced directly with
ref()in downstream models.
dbt Fusion Compatibility Updates
- Updated package to maintain compatibility with dbt-core versions both before and after v1.10.6, which introduced a breaking change to multi-argument test syntax (e.g.,
unique_combination_of_columns). - Temporarily removed unsupported tests to avoid errors and ensure smoother upgrades across different dbt-core versions. These tests will be reintroduced once a safe migration path is available.
- Removed all
dbt_utils.unique_combination_of_columnstests. - Moved
loaded_at_field: _fivetran_syncedunder theconfig:block insrc_facebook_ads.yml.
- Removed all
Under the Hood
- Updated conditions in
.github/workflows/auto-release.yml. - Added
.github/workflows/generate-docs.yml.
Full Changelog: v0.10.0...v1.0.0
v0.10.0 dbt_facebook_ads
PR #51 introduces the following updates:
Breaking Change for dbt Core < 1.9.6
Note: This is not relevant to Fivetran Quickstart users.
Migrated freshness from a top-level source property to a source config in alignment with recent updates from dbt Core (Source PR #45). This will resolve the following deprecation warning that users running dbt >= 1.9.6 may have received:
[WARNING]: Deprecated functionality
Found `freshness` as a top-level property of `facebook_ads` in file
`models/src_facebook_ads.yml`. The `freshness` top-level property should be moved
into the `config` of `facebook_ads`.
IMPORTANT: Users running dbt Core < 1.9.6 will not be able to utilize freshness tests in this release or any subsequent releases, as older versions of dbt will not recognize freshness as a source config and therefore not run the tests.
If you are using dbt Core < 1.9.6 and want to continue running Facebook Ads freshness tests, please elect one of the following options:
- (Recommended) Upgrade to dbt Core >= 1.9.6
- Do not upgrade your installed version of the
facebook_adspackage. Pin your dependency on v0.9.0 in yourpackages.ymlfile. - Utilize a dbt override to overwrite the package's
facebook_adssource and apply freshness via the old top-level property route. This will require you to copy and paste the entirety of thesrc_facebook_ads.ymlfile and add anoverrides: facebook_ads_sourceproperty.
Under the Hood
- Updated the package maintainer PR template.
Full Changelog: v0.9.0...v0.10.0
v0.9.0 dbt_facebook_ads
PR #50 introduces the following updates:
Schema Updates
11 total changes • 0 possible breaking changes
| Data Model | Change type | Old name | New name | Notes |
|---|---|---|---|---|
| facebook_ads__country_report | New Transform Model | Each record represents the daily performance of a Facebook account at the country level. | ||
| facebook_ads__region_report | New Transform Model | Each record represents the daily performance of a Facebook account at the region level. | ||
| stg_facebook_ads__demographics_country | New Staging Model | Uses demographics_country source table |
||
| stg_facebook_ads__demographics_country_tmp | New Staging Model | Uses demographics_country source table |
||
| stg_facebook_ads__demographics_country_actions | New Staging Model | Uses demographics_country_actions source table |
||
| stg_facebook_ads__demographics_country_actions_tmp | New Staging Model | Uses demographics_country_actions source table |
||
| stg_facebook_ads__demographics_region | New Staging Model | Uses demographics_region source table |
||
| stg_facebook_ads__demographics_region_tmp | New Staging Model | Uses demographics_region source table |
||
| stg_facebook_ads__demographics_region_actions | New Staging Model | Uses demographics_region_actions source table |
||
| stg_facebook_ads__demographics_region_actions_tmp | New Staging Model | Uses demographics_region_actions source table |
||
| stg_facebook_ads__account_history | New Columns | business_state, timezone_offset_hours_utc, min_daily_budget |
Feature Updates
- Added the
facebook_ads__using_demographics_countryandfacebook_ads__using_demographics_regionvariables, which can be used to enable or disable the above transformations related to the newdemographics_country/demograhics_country_actionsanddemographics_region/demographics_region_actionstables.- These variables are dynamically set for Fivetran Quickstart users, but false by default otherwise. See README for more details on how to enable these models, particularly if you are using dbt Core.
- Introduced the following passthrough column variables, which can be used to pass through additional metrics fields from their respective source reports to
facebook_ads__country_reportorfacebook_ads__region_report. See README for more details.facebook_ads__demographics_country_passthrough_metricsfacebook_ads__demographics_country_actions_passthrough_metricsfacebook_ads__demographics_region_passthrough_metricsfacebook_ads__demographics_region_actions_passthrough_metrics
Documentation
- Clarified conversion field output in the README and yml descriptions.
Under the Hood
- Added vertical integrity tests for the new
facebook_ads__country_reportandfacebook_ads__region_reportend models.
Full Changelog: v0.8.1...v0.9.0
v0.8.1 dbt_facebook_ads
Bug Fixes
- Added logic to the
stg_facebook_ads__creative_historymodel to dynamically convert theurl_tagsfield from a JSON to a STRING if necessary (BigQuery only). This is necessary for the success of downstream transformations in thefacebook_adspackage. (facebook_ads_source PR #43)
Note: If you are a BigQuery user unioning multiple Facebook Ads connections together in the package, the data type of
creative_history.url_tagsmust be consistent across your connections. Otherwise, thestg_facebook_ads__creative_history_tmpwill likely fail. Please reach out and create an issue if you are facing this error.
Under the Hood
- Added a consistency validation test for the
facebook_ads__url_tagsmodel. (PR #49) - Updated existing consistency tests to include conversion metrics. (PR #49)
Documentation
- Added Quickstart model counts to README. (#48)
- Corrected references to connectors and connections in the README. (#48)
- Adjusted the header formatting in the README. (PR #49)
- Updated LICENSE. (PR #49)
Full Changelog: v0.8.0...v0.8.1