Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(tiktok-ads): leave the creative tables unticked by default (#82801)

Javier Bahamondesc1e364936eff
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/settings.py
index 359de59a1a23..5efccd661ad3 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/settings.py
@@ -448,6 +448,9 @@ TIKTOK_ADS_CONFIG: dict[str, EndpointConfig] = {
partition_format="week",
partition_size=1,
endpoint_type=EndpointType.ASSET,
+ # Creative asset access is a separate grant most advertisers don't give, and the denial
+ # only surfaces once a sync has run. Opt-in keeps that failure out of a first-time setup.
+ should_sync_default=False,
),
"creative_images": EndpointConfig(
resource={
@@ -473,6 +476,7 @@ TIKTOK_ADS_CONFIG: dict[str, EndpointConfig] = {
partition_format="week",
partition_size=1,
endpoint_type=EndpointType.ASSET,
+ should_sync_default=False,
),
"campaign_demographic_report": audience_report_config(
"campaign_demographic_report",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/test/test_tiktok_ads_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/test/test_tiktok_ads_source.py
index 88726dad0cbe..cc2fd9b4c9a9 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/test/test_tiktok_ads_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/tiktok_ads/test/test_tiktok_ads_source.py
@@ -397,15 +397,17 @@ class TestTikTokAdsSource:
assert schema.supports_incremental is False
assert schema.incremental_fields == []
- def test_only_breakdown_reports_are_off_by_default(self):
+ def test_only_breakdown_and_creative_tables_are_off_by_default(self):
# New tables land in the schema picker pre-ticked. The breakdown reports fan every
- # entity-day out across its dimension values, so they must stay opt-in while the
- # tables that shipped before this stay selected.
+ # entity-day out across its dimension values, and the creative tables need a grant most
+ # advertisers withhold, so both stay opt-in while the rest stay selected.
should_sync = {schema.name: schema.should_sync_default for schema in self.source.get_schemas(self.config, 1)}
off_by_default = {name for name, default in should_sync.items() if not default}
assert off_by_default == {
+ "creative_videos",
+ "creative_images",
"campaign_demographic_report",
"campaign_country_report",
"campaign_platform_report",