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: Partnerstack [low-code CDK] #18603

Merged

Conversation

elliottrabac
Copy link
Contributor

@elliottrabac elliottrabac commented Oct 28, 2022

What

Describe what the change is solving
It helps to add screenshots if it affects the frontend.

Hacktoberfest: airbytehq/connector-contest#207

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.

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Oct 28, 2022
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.

A few comments but the connector looks solid. Please move request my review again when this is ready :)

type: DefaultPaginator
pagination_strategy:
type: "CursorPagination"
cursor_value: "{{ last_records[-1]['key'] }}"
Copy link
Member

Choose a reason for hiding this comment

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

Just curious about the usage of this option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which option are you referring to?

Copy link
Member

Choose a reason for hiding this comment

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

the cursor field, this is the first connector using this feature interpolation

Copy link
Contributor Author

@elliottrabac elliottrabac Nov 1, 2022

Choose a reason for hiding this comment

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

Not sure I'm getting your point, but cursor_value: "{{ last_records[-1]['key'] }}" is mandatory for the pagination here.

The API returns the objects ordered by creation date, and the pagination is possible by adding the last object key of the last batch of records in the next request.

Screenshot 2022-11-01 at 03 30 11

Copy link
Member

@marcosmarxm marcosmarxm Nov 1, 2022

Choose a reason for hiding this comment

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

@elliottrabac I saw this connector supports incremental syncs. Are you interested in implementing this sync mode for this connector? I'm askng because the incremental sync is much more interesting to users where you can retrieve only new records.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes sure! Curious to see how it goes with the low code CDK 👍

I'll ping you once done.

@elliottrabac elliottrabac marked this pull request as ready for review October 31, 2022 00:50
@marcosmarxm
Copy link
Member

@elliottrabac do you have a test account to share?

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.

@elliottrabac can you share the output of ./gradlew airbyte-integrations:connectors:source-partnerstack:integrationTest?

@elliottrabac
Copy link
Contributor Author

@elliottrabac do you have a test account to share?

Unfortunately no :/

I tried all the streams locally and on the VM, working well:
Screenshot 2022-11-01 at 19 44 42

Screenshot 2022-11-01 at 19 44 58

type: DefaultPaginator
pagination_strategy:
type: "CursorPagination"
cursor_value: "{{ last_records[-1]['key'] }}"
Copy link
Member

@marcosmarxm marcosmarxm Nov 1, 2022

Choose a reason for hiding this comment

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

@elliottrabac I saw this connector supports incremental syncs. Are you interested in implementing this sync mode for this connector? I'm askng because the incremental sync is much more interesting to users where you can retrieve only new records.

@marcosmarxm
Copy link
Member

@elliottrabac please request my review again when you finish the to solve the comments.

@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!

@elliottrabac
Copy link
Contributor Author

Hi @marcosmarxm I tried to implement the incremental sync for this connector but I'm struggling with datetimeformat with the low-code CDK because the format in Partnerstack is epoch timestamp (in ms).

  • Do you think there is a workaround for this?
  • Do I need to create a custom component for this?

I'm not sure I'll have time to wrap it up in the coming days. As the full refresh connector is working well, do you think we could merge it like that to meet the hacktoberfest deadline and iterate on the incremental sync after?

@elliottrabac
Copy link
Contributor Author

@marcosmarxm I implemented a custom stream slice similar to the GreenHouse one.

Acceptance tests with incremental sync:
Screenshot 2022-11-07 at 20 53 20

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 @elliottrabac I'll publish the connector during the week.

@marcosmarxm
Copy link
Member

marcosmarxm commented Nov 9, 2022

/publish connector=connectors/source-partnerstack run-tests=false

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


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

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

@marcosmarxm marcosmarxm merged commit 444e6f9 into airbytehq:master Nov 9, 2022
@sajarin sajarin changed the title 🎉 New source: Partnerstack 🎉 New source: Partnerstack [low-code CDK] Nov 9, 2022
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* add boilerplate

* configure schemas

* add connector doc

* update airbyte docs

* edit spec

* configure incremental sync

* use custom components

* add incremental acceptances tests

* add partnerstack to source def

* auto-bump connector version

Co-authored-by: marcosmarxm <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

6 participants