Skip to content

fix: add user_segment_key to insights PK candidates (SUPPORT-15309)#126

Closed
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1770929310-SUPPORT-15309-add-user-segment-key-pk
Closed

fix: add user_segment_key to insights PK candidates (SUPPORT-15309)#126
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1770929310-SUPPORT-15309-add-user-segment-key-pk

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Feb 12, 2026

Summary

Adds user_segment_key to the TABLES-SPECIFIC-PK-MAP for the "insights" table. This is a Facebook Ads breakdown dimension for Advantage+ Shopping Campaigns (ASC) that segments by user type (new vs existing). Without it in the PK candidates, rows that differ only by user_segment_key are deduplicated incorrectly, dropping data.

The column is only included in the actual PK when present in the output table (get-primary-key filters via table-has-column?), so existing configs without this breakdown are unaffected.

Addresses SUPPORT-15309.

Updates since last revision

Added keboola.ex-facebook-ads-v2 to the CI workflow (push.yml):

  • New ECR push step in the build job so branch tags are available for testing on the v2 component
  • New action-set-tag-developer-portal step in the deploy job for semantic tag releases

Previously the CI only pushed to keboola.ex-facebook, keboola.ex-facebook-ads, and keboola.ex-instagram — the keboola.ex-facebook-ads-v2 component (which is the one customers actually use) was missing.

Review & Testing Checklist for Human

  • Verify user_segment_key is the exact column name returned by the Facebook Ads API when using this breakdown (per Meta docs it should be, but confirm against live data)
  • Test with the customer's config (project 21301, keboola.ex-facebook-ads-v2) using tag 1770929310-SUPPORT-15309-add-user-segment-key-pk — confirm output table now includes user_segment_key in the PK and rows are no longer dropped
  • Spot-check that an existing config without user_segment_key breakdown produces identical output/PK as before
  • Confirm the CI service account (keboola+facebook_extractor_github_actions) has proper permissions for keboola.ex-facebook-ads-v2 in the Developer Portal (the branch build succeeded, but verify deploy-time set-tag will also work on a semantic release)

Notes

Release Notes

Justification, description

Added user_segment_key (Advantage+ Shopping Campaign user segment breakdown) to the primary key candidates for insights tables, fixing incorrect row deduplication when this breakdown is used. Also added keboola.ex-facebook-ads-v2 to CI build/deploy targets.

Plans for Customer Communication

N/A

Impact Analysis

Low risk. Only affects configs that use the user_segment_key breakdown — those will now correctly include it in the PK. All other configs are unaffected. The CI change adds a new push target without modifying existing ones.

Deployment Plan

N/A

Rollback Plan

N/A

Post-Release Support Plan

N/A


Open with Devin

Co-Authored-By: olena.marchuk@keboola.com <olena.marchuk@keboola.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: olena.marchuk@keboola.com <olena.marchuk@keboola.com>
Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant