You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
source-pinterest: targeting, product and keyword report streams omit their grain columns #87050
Eight report streams request Pinterest reports at a breakdown level (targeting, product group, product item, keyword), but the columns sent with the report request never include the column that identifies the breakdown. Records therefore arrive at the breakdown grain with no way to tell which targeting value, product or keyword a row belongs to.
Pinterest's async report API returns the columns listed in the report request body. All six columns above are valid members of Pinterest's ReportingColumn enum (v5 OpenAPI spec, pinterest/api-description, components.schemas.ReportingColumn), but manifest.yaml (as of 2.3.3) does not request them:
definitions.basic_async_retriever (columns: ≈ L172) — used by product_group_report
definitions.analytics_tagreting_report_base_stream (columns: ≈ L352) — used by the five targeting reports and keyword_report
definitions.product_item_report_stream (columns: ≈ L742) — its own copy of the list
All three lists are the same fixed column set. The custom_reports option cannot work around this: its columns enum in the spec is the same set and does not include these six columns.
Effect
At a breakdown level, one campaign on one day comes back as several records, one per targeting value, that differ only in their metrics. Illustrative example (not taken from a real sync):
CAMPAIGN_ID
DATE
SPEND_IN_DOLLAR
626736533506
2026-09-22
40.00
626736533506
2026-09-22
15.00
626736533506
2026-09-22
5.00
The totals are right (60.00 for the campaign-day), but the breakdown — the reason to request a targeting, product or keyword report at all — is lost. The records also look like duplicates, which invites downstream deduplication that silently drops real spend.
Proposed fix
Request the missing column(s) per stream (leaving the non-breakdown reports' requests unchanged), add the columns to reports_schema, and bump the minor version (additive columns). I plan to open a PR for this.
Relevant log output
N/A — no error is raised. The sync succeeds; the records simply lack the breakdown column.
Thanks for the write-up here - the level/column breakdown is really clear, and the note that the three column lists are not in fact identical (product_item_report already omits AD_ID and PIN_PROMOTION_ID) matches Pinterest's own constraint that ad and pin-promotion columns are not supported at the Product Item level.
Are you still planning to open a PR for this? I would like to take it on if not. I will hold off on opening a pull request for a couple of days to leave you room, so please shout if you are already partway through.
Plan if I do pick it up: request the missing grain column(s) per stream only (leaving advertiser_report, ad_group_report, campaign_analytics_report and pin_promotion_report byte-identical), add the six columns to reports_schema and custom_reports_schema, and extend the custom_reports spec columns enum so custom reports can request them too. Minor bump to 2.4.0 since the columns are additive.
Activity
mahesh-desu commentedon Oct 4, 2026
Thanks for the write-up here - the level/column breakdown is really clear, and the note that the three column lists are not in fact identical (product_item_report already omits AD_ID and PIN_PROMOTION_ID) matches Pinterest's own constraint that ad and pin-promotion columns are not supported at the Product Item level.
Are you still planning to open a PR for this? I would like to take it on if not. I will hold off on opening a pull request for a couple of days to leave you room, so please shout if you are already partway through.
Plan if I do pick it up: request the missing grain column(s) per stream only (leaving advertiser_report, ad_group_report, campaign_analytics_report and pin_promotion_report byte-identical), add the six columns to reports_schema and custom_reports_schema, and extend the custom_reports spec columns enum so custom reports can request them too. Minor bump to 2.4.0 since the columns are additive.