Skip to content
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

Apple msft facebook updates #137

Merged
merged 30 commits into from
Mar 27, 2025
Merged

Conversation

fivetran-reneeli
Copy link
Contributor

@fivetran-reneeli fivetran-reneeli commented Mar 12, 2025

This PR will address: Issue #136

Submission Checklist

Submitter:

  • Alignment meeting with the reviewer
  • Provide validation details:
    • Validation Steps: Outline how to verify the changes
      Successful run, especially with metricflow_time_spine. See internal ticket for validation tests

    • [] Testing Instructions: Clear steps for running/testing (e.g., scripts, sample data)

    • [na] Focus Areas: Highlight any complex logic or queries needing special attention

Reviewer:

  • Confirm submission requirements are met

Changelog

  • Draft after PR approval

Breaking Changes: Version Updates

The following dependencies have been updated following upstream breaking changes. See the below release notes for more information.

  • dbt_apple_search_ads (v0.5.0)
  • dbt_microsoft_ads (v0.10.0)
    The conversions field now exists for apple_search_ads, using tap_installs as the titular field.

Bug Fixes

  • Resolved a CLI Warning caused by the metricflow_time_spine model not having a properly documented YAML configuration.

Under The Hood

  • Updated apple_search_ads and microsoft_ads seed files to keep consistent with changes to seed files in the individual packages.
  • Removed the dependency on calogica/dbt_date as it is no longer actively maintained. To maintain functionality, the get_base_dates macro used in metricflow_time_spine semantic model has been replicated and housed within the macros/fivetran_date_macros folder. All relevant macros have been prefixed with fivetran_ to avoid potential naming conflicts.

@fivetran-reneeli
Copy link
Contributor Author

  • update changelog once upstream PRs are finalized
  • and regen docs

Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized I forgot to hit send on my PR notes yesterday 🤦

README.md Outdated
Comment on lines 578 to 581
version: [">=0.9.0", "<0.10.0"]

- package: fivetran/facebook_ads_source
version: [">=0.8.0", "<0.9.0"]
version: [">=0.9.0", "<0.10.0"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually FB isn't a breaking change, so this will still be [">=0.8.0", "<0.9.0"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

packages.yml Outdated
warn-unpinned: false

# - package: fivetran/facebook_ads
# version: [">=0.9.0", "<0.10.0"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# version: [">=0.9.0", "<0.10.0"]
# version: [">=0.8.0", "<0.9.0"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

packages.yml Outdated
@@ -2,20 +2,31 @@ packages:
- package: fivetran/amazon_ads
version: [">=0.4.0", "<0.5.0"]

- package: fivetran/apple_search_ads
version: [">=0.4.0", "<0.5.0"]
# - package: fivetran/apple_search_ads
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obligatory reminder to update apple_search_ads, facebook_ads, and microsoft_ads in here before merging

@fivetran-reneeli
Copy link
Contributor Author

Hi @fivetran-jamie now that the upstream packages are all released, I updated the dependency matrix.

Ready for a final look.

Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Super duper close -- left some minor comments

CHANGELOG.md Outdated
The following dependencies have been updated following upstream breaking changes. See the below release notes for more information.
- `dbt_apple_search_ads` ([v0.5.0](https://github.com/fivetran/dbt_apple_search_ads/releases/tag/v0.5.0))
- `dbt_microsoft_ads` ([v0.10.0](https://github.com/fivetran/dbt_microsoft_ads/releases/tag/v0.10.0))
The `conversions` field now exists for `apple_search_ads`, using `tap_installs` as the titular field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe conversions were included already, we just didn't need to explicitly include them in the get_query field_mapping because they matched the default field name "conversions"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok gotcha. i might just make note that we switched the native field that feeds into it then

README.md Outdated

>**Note**: This variable is defined under the `ad_reporting` hierarchy within this package and should not adjust any local global variable values in your project if you already have this variable defined. For more information on why this variable is needed and the different value options, refer to the [dbt-date package documentation](https://github.com/calogica/dbt-date#variables).
>**Note**: This `dbt_date:time_zone` variable is defined under the `ad_reporting` hierarchy within this package and should not adjust any local global variable values in your project if you already have this variable defined. For more information on why this variable is needed and the different value options, refer to the Variable section of the [dbt-date package documentation](https://hub.getdbt.com/godatadriven/dbt_date/latest/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a suggestion in the CHANGELOG

CHANGELOG.md Outdated
Comment on lines 7 to 8
- `dbt_microsoft_ads` ([v0.10.0](https://github.com/fivetran/dbt_microsoft_ads/releases/tag/v0.10.0))
The `conversions` field for `apple_search_ads` now sources from `tap_installs`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this renders makes it look like this is part of the microsoft ads update
image

Perhaps make it its own bullet or a sub-bullet of the apple search ads note? Or could go in the "Under the Hood" section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching! moved it to under the hood

Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-reneeli a few comments and change requests before release approval.

CHANGELOG.md Outdated
## Under The Hood
- Updated `apple_search_ads` and `microsoft_ads` seed files to keep consistent with changes to seed files in the individual packages.
- The `conversions` field for `apple_search_ads` now sources from `tap_installs`.
- Removed the dependency on [calogica/dbt_date](https://github.com/calogica/dbt-date) as it is no longer actively maintained. To maintain functionality, the `get_base_dates` macro used in `metricflow_time_spine` semantic model has been replicated and housed within the `macros/fivetran_date_macros` [folder](https://github.com/fivetran/dbt_ad_reporting/tree/main/macros/fivetran_date_macros). All relevant macros have been prefixed with `fivetran_` to avoid potential naming conflicts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to the breaking changes: version updates section

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also make a sub bullet stating that we have retained the variable name/usage of dbt_date:time_zone to make this transition easier for users. It will be relevant for them to know that although we are removing the dependency and renaming macros, this variable will still be used the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, updated

CHANGELOG.md Outdated
## Under The Hood
- Updated `apple_search_ads` and `microsoft_ads` seed files to keep consistent with changes to seed files in the individual packages.
- The `conversions` field for `apple_search_ads` now sources from `tap_installs`.
- Removed the dependency on [calogica/dbt_date](https://github.com/calogica/dbt-date) as it is no longer actively maintained. To maintain functionality, the `get_base_dates` macro used in `metricflow_time_spine` semantic model has been replicated and housed within the `macros/fivetran_date_macros` [folder](https://github.com/fivetran/dbt_ad_reporting/tree/main/macros/fivetran_date_macros). All relevant macros have been prefixed with `fivetran_` to avoid potential naming conflicts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks a bit strange that we only need one macro, but we ended up recreating 11 macros. Adding a bit more context here to explain why there are so many macros.

Suggested change
- Removed the dependency on [calogica/dbt_date](https://github.com/calogica/dbt-date) as it is no longer actively maintained. To maintain functionality, the `get_base_dates` macro used in `metricflow_time_spine` semantic model has been replicated and housed within the `macros/fivetran_date_macros` [folder](https://github.com/fivetran/dbt_ad_reporting/tree/main/macros/fivetran_date_macros). All relevant macros have been prefixed with `fivetran_` to avoid potential naming conflicts.
- Removed the dependency on [calogica/dbt_date](https://github.com/calogica/dbt-date) as it is no longer actively maintained. To maintain functionality, the `get_base_dates` macro (along with all other dependent macros) used in `metricflow_time_spine` semantic model has been replicated and housed within the `macros/fivetran_date_macros` [folder](https://github.com/fivetran/dbt_ad_reporting/tree/main/macros/fivetran_date_macros). All fivetran_date_macros have been prefixed with `fivetran_` to avoid potential naming conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

README.md Outdated

>**Note**: This variable is defined under the `ad_reporting` hierarchy within this package and should not adjust any local global variable values in your project if you already have this variable defined. For more information on why this variable is needed and the different value options, refer to the [dbt-date package documentation](https://github.com/calogica/dbt-date#variables).
>**Note**: This `dbt_date:time_zone` variable is defined under the `ad_reporting` hierarchy within this package and should not adjust any local global variable values in your project if you already have this variable defined. For more information on why this variable is needed and the different value options, refer to the Variable section of the [dbt-date package documentation](https://github.com/godatadriven/dbt-date/tree/main?tab=readme-ov-file#variables).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit strange that we have decided to host the macros, but then still point to a different repo to explain the variable. The variable section we link to here is quite small. Let's just recreate it here instead so we aren't referencing a package we aren't actually using.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some updates, let me know what you think

Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fivetran-reneeli fivetran-reneeli linked an issue Mar 27, 2025 that may be closed by this pull request
4 tasks
@fivetran-reneeli fivetran-reneeli merged commit 6d40324 into main Mar 27, 2025
8 checks passed
@fivetran-reneeli fivetran-reneeli deleted the apple_msft_facebook_updates branch March 27, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants