Skip to content

Bump tiktok_ads Smart+ ads join fix - #187

Merged
fivetran-catfritz merged 17 commits into
mainfrom
update/bump-tiktok-ads-smart-ads
Sep 30, 2026
Merged

fivetran-catfritz merged 17 commits into
mainfrom
update/bump-tiktok-ads-smart-ads

Conversation

@fivetran-catfritz

@fivetran-catfritz fivetran-catfritz commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Overview

Package version introduced in this PR:

  • 2.8.0-a1
  • 2.8.0-a2
  • 2.8.0

This PR addresses the following Issue/Feature(s):

Summary of changes:

  • Bumps the required tiktok_ads package version to 1.5.0-a1, which fixes TikTok Smart+ ads resolving to null ad_id/ad_name/account_id/account_name/URL fields in ad_reporting__ad_report, ad_reporting__advertiser_report, and ad_reporting__url_report.

Submission Checklist

  • Alignment meeting with the reviewer (if needed)
    • Timeline and validation requirements discussed
  • Provide validation details:
    • Validation Steps: Check for unintentional effects (e.g., add/run consistency & integrity tests)
    • Testing Instructions: Confirm the change addresses the issue(s)
    • Focus Areas: Complex logic or queries that need extra attention
  • Merge any relevant open PRs into this PR

Changelog

  • Draft changelog for PR
  • Final changelog for release review

🤖 Generated with Claude Code

fivetran-catfritz and others added 2 commits September 18, 2026 11:14
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fivetran-catfritz fivetran-catfritz self-assigned this Sep 18, 2026
@fivetran-catfritz fivetran-catfritz added the pre-release Triggers the auto-releaser workflow. label Sep 18, 2026

@fivetran-jamie fivetran-jamie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved for pre-release

@fivetran-jamie fivetran-jamie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah wait do we need to add seed data

fivetran-catfritz and others added 2 commits September 18, 2026 13:00
CI was hitting tiktok_ads' Redshift empty-table fallback because this
package's own integration_tests never seeded smart_plus_ad_history. Adding
the seed (plus a matching Smart+ ad row in ad_report_hourly) exercises the
real join path instead. Verified end-to-end on BigQuery: the Smart+ ad now
resolves correctly through tiktok_ads__ad_report/url_report and the
ad_reporting__ad_report/url_report combo layer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The a1 pre-release pinned tiktok_ads to 1.5.0-a1, which joined Smart+
ads on the wrong key (smart_plus_ad_id) and never actually resolved
them. tiktok_ads 1.5.0-a2 fixes this via creative_history, but hasn't
been tagged yet -- packages.yml temporarily points at the
feature/smart-ads branch so CI exercises the real fix. Switch back to
the versioned package pin once that tag exists (staged in a comment).

Also adds the creative_history seed tiktok_ads now requires, and fixes
smart_plus_ad_history's seed to use a smart_plus_ad_id that doesn't
coincidentally match ad_id, mirroring the real customer-reported
mismatch.

Verified on BigQuery: creative_id=5 resolves end-to-end through
tiktok_ads__ad_report into ad_reporting__ad_report (account_id/name
correctly joined) for the Smart+ ad.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fivetran-catfritz fivetran-catfritz changed the title Bump tiktok_ads to 1.5.0-a1 for Smart+ ads join fix Bump tiktok_ads Smart+ ads join fix Sep 24, 2026
@fivetran-catfritz fivetran-catfritz added pre-release Triggers the auto-releaser workflow. and removed pre-release Triggers the auto-releaser workflow. labels Sep 24, 2026
Comment thread packages.yml Outdated
Comment thread README.md Outdated

- package: fivetran/tiktok_ads
version: [">=1.3.0", "<1.4.0"]
version: 1.5.0-a2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
version: 1.5.0-a2
version: [">=1.5.0", "<1.6.0"]

@fivetran-jamie fivetran-jamie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, biggest thing is just to update the quickstart.yml. Will approve for pre-release after that!

Comment thread integration_tests/dbt_project.yml Outdated
@@ -1,5 +1,5 @@
name: 'ad_reporting_integration_tests'
version: '2.7.3'
version: '2.8.0-a2'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
version: '2.8.0-a2'
version: '2.8.0'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bumped to 2.8.0 (also dropped the -a2 on tiktok_ads itself, going straight to a real 1.5.0 rather than another alpha).

Comment thread dbt_project.yml Outdated
@@ -1,5 +1,5 @@
name: 'ad_reporting'
version: '2.7.3'
version: '2.8.0-a2'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
version: '2.8.0-a2'
version: '2.8.0'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated

| Data Model(s) | Change type | Old | New | Notes |
| ---------- | ----------- | -------- | -------- | ----- |
| `ad_reporting__ad_report`, `ad_reporting__advertiser_report`, `ad_reporting__url_report` | Bug Fix | For TikTok Smart+ ads, `ad_id`, `ad_name`, `account_id`, `account_name`, and the URL fields resolved to `null` | These fields now resolve correctly for TikTok Smart+ ads | Increases the required `tiktok_ads` package version to [1.5.0-a2](https://github.com/fivetran/dbt_tiktok_ads/blob/main/CHANGELOG.md#dbt_tiktok_ads-v150-a2), which resolves TikTok Smart+ ads through `creative_history`. See the [tiktok_ads CHANGELOG](https://github.com/fivetran/dbt_tiktok_ads/blob/main/CHANGELOG.md#dbt_tiktok_ads-v150-a2) for details |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the changelog include the TikTok staging model additions? We should at least increase the TikTok model count in the README

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added New Staging Models rows for both, and bumped the TikTok model count to 28.

Comment thread README.md
@@ -0,0 +1,2 @@
creative_id,modify_time,smart_plus_ad_id,advertiser_id,adgroup_id,campaign_id,video_id,create_time,creative_name,campaign_name,adgroup_name,identity_id,identity_type,campaign_automation_type,ad_text,secondary_status,operation_status,image_ids

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(not related to this seed file) The new TikTok variables need to be added to the quickstart.yml right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added both to table_variables, same pattern as tiktok_ads__using_location.

fivetran-catfritz and others added 3 commits September 24, 2026 10:55
- Adds tiktok_ads__using_creative_history and
  tiktok_ads__using_smart_plus_ad_history to quickstart.yml's
  table_variables, matching the existing tiktok_ads__using_location
  pattern (Jamie's comment on the seed file).
- Documents both new vars in the README's variable-config block and
  updates the TikTok Ads model count from 22 to 28 (Jamie's README
  comment).
- Bumps version from 2.8.0-a2 to 2.8.0 per Jamie's suggestion, now that
  tiktok_ads itself moved to a real 1.5.0 rather than another alpha.
- Adds New Staging Models rows to the CHANGELOG for
  stg_tiktok_ads__creative_history and stg_tiktok_ads__smart_plus_ad_history,
  matching this repo's existing convention for upstream package additions,
  and updates the tiktok_ads CHANGELOG link/version references to 1.5.0.

Not applied: the packages.yml/README pin suggestion to switch tiktok_ads
to a real version range -- that tag hasn't been cut yet, so doing so now
would break dbt deps. Leaving the TEMP feature/smart-ads branch pin in
place until the tag exists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Also updates the tiktok_ads CHANGELOG link/anchor back to -a2 to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
I'd overwritten the existing v2.8.0-a1 entry in place instead of adding
a2 as its own entry. Pre-releases on this branch each get their own
entry -- restores a1 as it was, and a2 now only lists what's actually
new in that pass: the corrected join key and the new creative_history
staging model (smart_plus_ad_history was already added in a1).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@fivetran-jamie fivetran-jamie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved for pre-release!

Comment thread packages.yml Outdated

- package: fivetran/tiktok_ads
version: [">=1.4.0", "<1.5.0"]
version: 1.5.0-a2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
version: 1.5.0-a2
version: [">=1.5.0", "<1.6.0"]

@fivetran-catfritz fivetran-catfritz added pre-release Triggers the auto-releaser workflow. and removed pre-release Triggers the auto-releaser workflow. labels Sep 24, 2026
fivetran-catfritz and others added 4 commits September 28, 2026 15:15
Merges the a1/a2 pre-release entries into the final numbered release,
matching the same consolidation done on tiktok_ads. Lists both new
staging models (smart_plus_ad_history from a1, creative_history from
a2) and both new vars, and updates the tiktok_ads CHANGELOG link to
its own now-consolidated v1.5.0 entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
packages.yml still exact-pins to 1.5.0-a2 for CI until the real 1.5.0
tag is cut, but the README's recommended install snippet should show
the standard range customers will actually use post-GA.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pre-release entries stay as their own historical record rather than
being deleted when the final version ships, matching tiktok_ads.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The 1.5.0-a2 tag doesn't include the smart_plus_ad_id type-cast fix
(customer-reported BigQuery bug) or the follow-up comment cleanup, so
pin CI to the branch again until the next tag is cut.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread packages.yml Outdated
@fivetran-catfritz fivetran-catfritz removed the pre-release Triggers the auto-releaser workflow. label Sep 28, 2026
fivetran-catfritz and others added 3 commits September 29, 2026 16:26
Three pre-existing issues, same class of bug as the tiktok_ads
identity_id fix -- long string columns need explicit widths for
Redshift, and inconsistent timestamp formats can break BigQuery's
CSV type inference:

- twitter_campaign_report_data: one row's _fivetran_synced had a
  stray trailing "Z" not present in the other rows, which BigQuery's
  CSV loader rejected outright.
- twitter_tweet_url_data.expanded_url (max 395 chars) and
  facebook_ads_creative_history_data.object_story_link_data_child_attachments
  (max 641 chars) had no +column_types override, so Redshift's
  default-width varchar(256) inference overflowed.

Verified all three seeds load cleanly on Redshift/BigQuery.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removed temporary comment regarding CI for tiktok_ads.
@fivetran-catfritz fivetran-catfritz added the docs:ready Triggers the docs generator workflow. label Sep 30, 2026
@fivetran-catfritz
fivetran-catfritz enabled auto-merge (squash) September 30, 2026 15:56
@fivetran-catfritz
fivetran-catfritz merged commit 0f6fc72 into main Sep 30, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs:ready Triggers the docs generator workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants