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

Feat/Fix: Amazon Ads connector #6461

Merged
merged 3 commits into from
Oct 1, 2021
Merged

Conversation

harshithmullapudi
Copy link
Contributor

  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

  1. x.java
  2. y.python

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -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
  • Documentation which references the generator is updated as needed.

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
@github-actions github-actions bot added the area/connectors Connector related issues label Sep 27, 2021
@CLAassistant
Copy link

CLAassistant commented Sep 27, 2021

CLA assistant check
All committers have signed the CLA.

@@ -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:
Copy link
Contributor

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 ?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the change @avida

Copy link
Contributor

@avida avida left a 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

@avida
Copy link
Contributor

avida commented Oct 1, 2021

/publish connector=connectors/source-amazon-ads

🕑 connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/1294704672
❌ connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/1294704672

@avida
Copy link
Contributor

avida commented Oct 1, 2021

Cannot publish probably cause its PR from another repo, will try to merge and publish again

@avida avida merged commit ae3a3d5 into airbytehq:master Oct 1, 2021
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/amazon-ads connectors/sources-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants