source-pinterest: targeting, product and keyword report streams omit their grain columns · Issue #87050 · airbytehq/airbyte · GitHub
Skip to content

source-pinterest: targeting, product and keyword report streams omit their grain columns #87050

Open

Description

Connector Name

source-pinterest

Connector Version

2.3.3

What step the error happened?

During the sync

Relevant information

Summary

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.

Stream level sent Missing column(s)
advertiser_targeting_report ADVERTISER_TARGETING TARGETING_TYPE, TARGETING_VALUE, TARGETING_VALUE_NAME
campaign_targeting_report CAMPAIGN_TARGETING TARGETING_TYPE, TARGETING_VALUE, TARGETING_VALUE_NAME
ad_group_targeting_report AD_GROUP_TARGETING TARGETING_TYPE, TARGETING_VALUE, TARGETING_VALUE_NAME
pin_promotion_targeting_report PIN_PROMOTION_TARGETING TARGETING_TYPE, TARGETING_VALUE, TARGETING_VALUE_NAME
product_group_targeting_report PRODUCT_GROUP_TARGETING PRODUCT_GROUP_ID, TARGETING_TYPE, TARGETING_VALUE, TARGETING_VALUE_NAME
product_group_report PRODUCT_GROUP PRODUCT_GROUP_ID
product_item_report PRODUCT_ITEM PRODUCT_ITEM_ID
keyword_report KEYWORD KEYWORD_ID

Why this happens

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.

Contribute

  • Yes, I want to contribute

Activity

  1. mahesh-desu commented on Oct 4, 2026

    @mahesh-desu

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions