-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Feat/Fix: Amazon Ads connector #6461
Conversation
1. Added Sponsored Brands Video Report 2. Added region in config to pull data for multiple regions 3. Fix: amazon ads can't pull data more than 60 days
airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/spec.py
Show resolved
Hide resolved
...connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/brands_video_report.py
Show resolved
Hide resolved
...ions/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/report_streams.py
Outdated
Show resolved
Hide resolved
@@ -244,6 +244,10 @@ def get_report_date_ranges(start_report_date: Optional[datetime]) -> Iterable[st | |||
now = datetime.utcnow() | |||
if not start_report_date: | |||
start_report_date = now | |||
|
|||
# You cannot pull data for amazon ads more than 60 days | |||
if (now - start_report_date).days > 59: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be 59 - 3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I am looking back for 3 days in the stream_slices
function if the start_date
here in this function comes to be older than 60 days then it's gonna adjust it in get_report_date_ranges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but for example if you have start_report_date that is 59 days before today, you will substract 3 days and it would be 62 days which is out of timerange window. So it should be 59 - LOOK_BACK_WINDOW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the change @avida
airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/source.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/source.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, just small changes
9f1f3f7
to
94f1728
Compare
94f1728
to
b0545e5
Compare
f1bb8b1
to
24eb6bc
Compare
24eb6bc
to
1f22836
Compare
1f22836
to
c3c489a
Compare
/publish connector=connectors/source-amazon-ads
|
Cannot publish probably cause its PR from another repo, will try to merge and publish again |
* Feat/Fix: Amazon Ads connector 1. Added Sponsored Brands Video Report 2. Added region in config to pull data for multiple regions 3. Fix: amazon ads can't pull data more than 60 days
What
Describe what the change is solving
It helps to add screenshots if it affects the frontend.
How
Describe the solution
Recommended reading order
x.java
y.python
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes