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

Apply v1.3 API updates + remove JSON fields #11

Merged
merged 7 commits into from
Jul 25, 2023

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Jul 20, 2023

PR Overview

This PR will address the following Issue/Feature:
Issues from source package.
fivetran/dbt_tiktok_ads_source#8
fivetran/dbt_tiktok_ads_source#7

This PR will result in the following new package version: 0.4.0

Although no fields were renamed due to the API upgrade, JSON array fields were removed to avoid BigQuery issues, so this is a breaking change.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

  • In the July 2023 connector update for TikTok Ads, we upgraded the connector to the v1.3 API. As a result the dependent fields and field names from the downstream staging models have changed.
  • None of the renamed fields were brought into the dbt_tiktok_ads package other than age to age_groups, but it was subsequently removed due to an additional issue. We did need to update seed files with the renamed field names.
  • Removed JSON array fields (action_categories, age_groups, interest_category and language) from our models that were causing issues with BigQuery, which currently does not support JSON arrays in group by functions.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • dbt run –vars (if applicable)

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

Fields mentioned above have been removed from the models in seed and development packages. Run off this branch to confirm.

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • README updates have been applied (if applicable)
  • [NA] DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

🕙

Copy link
Collaborator

@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-avinash thanks for working through this API update! Your changes look good, I just have a few requests to update the code highlighted in my review below.

Additionally, one more change that needs to be applied before approving:

  • Be sure to update the README version of the package as this is a breaking change. I noticed you marked that check as NA in the PR submission form. However, since this is a breaking change, we will want to make that update to reference the new version range.

CHANGELOG.md Outdated
Comment on lines 5 to 7
- In the [July 2023 connector update for TikTok Ads](https://fivetran.com/docs/applications/tiktok-ads/changelog), we upgraded the connector to the v1.3 API. As a result the dependent fields and field names from the downstream staging models have changed.
- None of the renamed fields were brought into the `dbt_tiktok_ads` package other than `age ` to `age_groups`, but it was subsequently removed due to an additional issue. We did need to update seed files with the renamed field names.
- Removed JSON array fields (`action_categories`, `age_groups`, `interest_category` and `language`) from our models that were causing issues with BigQuery, which currently does not support JSON arrays in group by functions
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would request we make this a bit more concise as to what is changing inform users what exactly was removed, and a short explainer as to why. For example, there is probably no reason to explain the renaming of age to age_groups if we are just removing it already. My suggestion would be something along the lines of the following:

Suggested change
- In the [July 2023 connector update for TikTok Ads](https://fivetran.com/docs/applications/tiktok-ads/changelog), we upgraded the connector to the v1.3 API. As a result the dependent fields and field names from the downstream staging models have changed.
- None of the renamed fields were brought into the `dbt_tiktok_ads` package other than `age ` to `age_groups`, but it was subsequently removed due to an additional issue. We did need to update seed files with the renamed field names.
- Removed JSON array fields (`action_categories`, `age_groups`, `interest_category` and `language`) from our models that were causing issues with BigQuery, which currently does not support JSON arrays in group by functions
- In the [July 2023 connector update for TikTok Ads](https://fivetran.com/docs/applications/tiktok-ads/changelog), the connector was updated to support the TikTok Ads v1.3 API. As a result breaking changes exist within the dependent [v0.4.0 dbt_tiktok_ads_source](https://github.com/fivetran/dbt_tiktok_ads_source/releases/tag/v0.4.0) release in addition to the following breaking changes within this package release:
| **model** | **removed_fields** |
| ----------| -------------------- |
| [tiktok_ads__ad_group_report](https://fivetran.github.io/dbt_tiktok_ads/#!/model/model.tiktok_ads.tiktok_ads__ad_group_report) | `action_categories`, `age`, `languages`, `interest_category` |
| [tiktok_ads__ad_report](https://fivetran.github.io/dbt_tiktok_ads/#!/model/model.tiktok_ads.tiktok_ads__ad_report) | `action_categories`, `age`, `languages`, `interest_category` |
| [tiktok_ads__url_report](https://fivetran.github.io/dbt_tiktok_ads/#!/model/model.tiktok_ads.tiktok_ads__url_report) | `action_categories`, `age`, `languages`, `interest_category` |
>**Note**: Some of the above fields were also removed due to complications with the BigQuery JSON datatype causing errors during compliation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, thanks for this suggestion.

Copy link
Contributor Author

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Thanks for reminding me about the README. Changes are applied as well.

Copy link
Collaborator

@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-avinash thanks for making the updates. Approved!

packages.yml Outdated
Comment on lines 2 to 7
# - package: fivetran/tiktok_ads_source
# version: [">=0.3.0", "<0.4.0"]

- git: https://github.com/fivetran/dbt_tiktok_ads_source.git
revision: feature/tiktok-ads-v1.3-api-update
warn-unpinned: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Usual reminder to update this before merge.

@fivetran-avinash fivetran-avinash merged commit 794c0f8 into main Jul 25, 2023
1 check passed
@fivetran-avinash fivetran-avinash deleted the feature/tiktok-ads-v1.3-api-update branch July 25, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants