Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update the Primary Keys for AdAnalyticsByCampaign Stream #90

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexasteiner
Copy link

I have been trying to use the AdAnatlyicsByCampaign stream and am running into an issue where the value in the dateRange column is always {}. Since dateRange and campaign_id are currently the primary_keys for this stream, I am only getting one row for each campaign_id instead of getting data for each day. Setting the primary_keys to campaign_id and day instead solved this issue for me.

This issue is discussed in this thread also:
https://meltano.slack.com/archives/C01UW1W4D5Y/p1692800552882659?thread_ts=1681852177.144289&cid=C01UW1W4D5Y

@alexasteiner alexasteiner changed the title Update the Primary Keys for AdAnalyticsByCampaign Stream Fix: Update the Primary Keys for AdAnalyticsByCampaign Stream Aug 28, 2023
@alexasteiner alexasteiner changed the title Fix: Update the Primary Keys for AdAnalyticsByCampaign Stream fix: Update the Primary Keys for AdAnalyticsByCampaign Stream Aug 28, 2023
@pnadolny13
Copy link
Collaborator

daterange is always null so only one row gets inserted into the table for each campaign_id

@alexasteiner I dont have a linkedin account to test against but from reading the docs and code I'm kind of confused about whats happening here. The changes in the PR might be the solve for this but I dont understand how dateRange is null. I see the sample response for this endpoint https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?view=li-lms-2023-08&tabs=http#sample-response has a dateRange dict that contains the day value. In the tap its setting the day property based on the contents of the dateRange dict https://github.com/alexasteiner/tap-linkedin-ads-meltanolabs/blob/219d82fb9951d5624a6df41c6abf631348bf6c1d/tap_linkedin_ads/streams.py#L339. So I dont know how day could be populated but dateRange is null. Am I reading it correctly?

I wonder if you could inspect output of the tap without target-redshift to see if dateRange is null in the actual Singer messages. You can run the tap directly or in meltano run meltano invoke tap-linkedin-ads to see the messages print to stdout.

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.

3 participants