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

🎉 New Source: Dynamodb #18750

Merged
merged 11 commits into from
Nov 14, 2022
Merged

🎉 New Source: Dynamodb #18750

merged 11 commits into from
Nov 14, 2022

Conversation

itaseskii
Copy link
Contributor

What

Adds Dynamodb source connector airbytehq/connector-contest#149

How

Describe the solution

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.

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/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

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as 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

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped 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

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@itaseskii itaseskii requested a review from a team as a code owner November 1, 2022 02:04
@CLAassistant
Copy link

CLAassistant commented Nov 1, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ itaseskii
✅ marcosmarxm
❌ itaseski


itaseski seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation area/platform issues related to the platform area/protocol labels Nov 1, 2022
@itaseskii itaseskii changed the title 🎉 New source: Dynamodb 🎉 New Source: Dynamodb Nov 1, 2022
@marcosmarxm
Copy link
Member

@itaseskii can you check your commits, look one was made with another user.

@marcosmarxm
Copy link
Member

@itaseskii I'll review this tomorrow! thsanks for the contribution

@marcosmarxm
Copy link
Member

Hello! I'm going to be out of the office this Friday and won't be able to review your contribution again today, I return next Monday. So far, most contributions look solid and are almost done to be approved. As said in Chris' comment all contributions made before 2-November are eligible to receive the prize and have 2 weeks to merge the contributions. But I ensure next week we're going to have your contribution merged. If you have questions about the implementation you can send them in #hacktoberfest-2022 in Airbyte's Slack.

Sorry the inconvenience and see you again next week, thank you so much for your contribution!

Copy link
Member

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

Asking some help to review the protocol change.

@@ -8,6 +8,7 @@ public enum JsonSchemaPrimitive {

STRING,
NUMBER,
INTEGER,
Copy link
Member

Choose a reason for hiding this comment

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

@airbytehq/protocol-reviewers can someone take a look into this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcosmarxm Out of curiosity, why do we need an integer type when it already has NUMBER that encompasses integer values? See https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Number.html for more details.

Copy link
Contributor Author

@itaseskii itaseskii Nov 9, 2022

Choose a reason for hiding this comment

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

Hey @jdpgrailsdev I have added this as a first class JsonSchemaPrimitive for the reason that Number is used for storing both decimal and integeter numbers and in the IncrementalUtil.compareCursor() method it is used for comparing doubles instead of integers. Since Dynamodb can support incremental syncs using epoch timestamps I needed the ability to compare two integers for the state transmission.

Copy link
Contributor

Choose a reason for hiding this comment

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

@itaseskii You can get an integer value from a Number, so I'm not sure why we would need an explicit INTEGER value in the protocol. I'm also not sure why it would matter if the code is comparing two Number objects. Could you point out where in the pull request you are doing this comparison or where in the existing code you think it would be an issue to compare two Number objects instead of integers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdpgrailsdev The implementation in IncrementalUtil.compareCursor() is not comparing Numbers but Doubles when a JsonSchemaPrimitive.Number is provided. But even so there is a point that it shouldn't be an issue comparing two integers using Double.compare(Double.parseDouble(original), Double.parseDouble(candidate)) since they can easily be parsed to doubles if the value is provided as String. I have reverted the addition of the Integer type to the JsonSchemaPrimitive enum and thanks a lot for your input!

@marcosmarxm
Copy link
Member

marcosmarxm commented Nov 8, 2022

/test connector=connectors/source-dynamodb

🕑 connectors/source-dynamodb https://github.com/airbytehq/airbyte/actions/runs/3415890819
✅ connectors/source-dynamodb https://github.com/airbytehq/airbyte/actions/runs/3415890819
No Python unittests run

Build Passed

Test summary info:

All Passed

@marcosmarxm
Copy link
Member

@itaseskii waiting the protocol feedback, besides that the connector looks solid!

@octavia-squidington-iv octavia-squidington-iv removed area/protocol area/platform issues related to the platform labels Nov 11, 2022
@marcosmarxm
Copy link
Member

marcosmarxm commented Nov 14, 2022

/test connector=connectors/source-dynamodb

🕑 connectors/source-dynamodb https://github.com/airbytehq/airbyte/actions/runs/3457626655
✅ connectors/source-dynamodb https://github.com/airbytehq/airbyte/actions/runs/3457626655
No Python unittests run

Build Passed

Test summary info:

All Passed

Copy link
Member

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

Thanks @itaseskii

@marcosmarxm
Copy link
Member

marcosmarxm commented Nov 14, 2022

/publish connector=connectors/source-dynamodb

🕑 Publishing the following connectors:
connectors/source-dynamodb
https://github.com/airbytehq/airbyte/actions/runs/3461930065


Connector Did it publish? Were definitions generated?
connectors/source-dynamodb

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@marcosmarxm marcosmarxm merged commit a2d24b5 into airbytehq:master Nov 14, 2022
@RealChrisSean RealChrisSean added the python Pull requests that update Python code label Nov 15, 2022
@RealChrisSean
Copy link

Hello @itaseskii can you please update your profile with your email?

If you prefer to DM me instead, please dm with the following:

Full name
Email
link to this PR
Thanks!

@marcosmarxm marcosmarxm mentioned this pull request Nov 21, 2022
37 tasks
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* dynamodb source connector

* code cleanup

* code cleanup

* add date type filtering

* add doc

* revert integer schema primitive

* add dynamodb to source def

* auto-bump connector version

Co-authored-by: itaseski <itaseski@debian-BULLSEYE-live-builder-AMD64>
Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
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/dynamodb hacktober python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants