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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃帀 New Source: Polygon Stocks #18842

Closed
wants to merge 0 commits into from

Conversation

Harshil0512
Copy link
Contributor

What

The Following PR adds a Low Code CDK Source for Polygon-Stocks-API provided by https://polygon.io/

How

The PR uses the configuration based CDK and implements full refresh syncs of the following streams :

  • stock_api_stream

Recommended reading order

  1. spec.yaml
  2. polygon_stock_api.yaml
  3. streams

馃毃 User Impact 馃毃

No Changes To Existing Code

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
    • [ x 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

Polygon_Stocks_API

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@Harshil0512
Copy link
Contributor Author

Issue related to this PR :

airbytehq/connector-contest#261

@marcosmarxm
Copy link
Member

@Harshil0512 please check your commits there is something wrong with it.

@Harshil0512
Copy link
Contributor Author

@marcosmarxm may I know what is wrong with the commit ? is there something wrong with the files which I created or something with the files belongs to your repository updated due to my commit?

@marcosmarxm
Copy link
Member

You're pushing files that don't make part of the pull request goal. Take a look.

@Harshil0512
Copy link
Contributor Author

Okay let me see and update it

@github-actions github-actions bot removed area/server area/platform issues related to the platform area/worker Related to worker area/api Related to the api labels Nov 2, 2022
@Harshil0512
Copy link
Contributor Author

@marcosmarxm can you please check the files now?

@marcosmarxm marcosmarxm removed the request for review from a team November 2, 2022 18:32
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.

Hello @Harshil0512, Marcos from Airbyte here 馃憢 . We received more than 25 new contributions along the weekend. One is yours 馃帀 thank so much for! Our team is limited and maybe the review process can take longer than expected. As described in the Airbyte's Hacktoberfest your contribution was submitted before November 2nd and it is eligible to win the prize. The review process will validate other requirements. I ask to you patience until someone from the team review it.

Because I reviewed some contributions for Hacktoberfest so far I saw some common patterns you can check in advance:

  • Make sure you have added connector documentation to /docs/integrations/
  • Remove the file catalog from /integration_tests
  • Edit the sample_config.json inside /integration_tests
  • For the configured_catalog you can use only json_schema: {}
  • Add title to all properties in the spec.yaml
  • Make sure the documentationUrl in the spec.yaml redirect to Airbyte's future connector page, eg: connector Airtable the documentationUrl: https://docs.airbyte.com/integrations/sources/airtable
  • Review now new line at EOF (end-of-file) for all files.

If possible send to me a DM in Slack with the tests credentials, this process will make easier to us run integration tests and publish your connector. If you only has production keys, make sure to create a bootstrap.md explaining how to get the keys.

@Harshil0512
Copy link
Contributor Author

Okat let me review the files once again. Thank you.

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

@Harshil0512
Copy link
Contributor Author

Sure No Problem @marcosmarxm

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Nov 5, 2022
@Harshil0512
Copy link
Contributor Author

I performed the changes mentioned in the review changes

@Harshil0512
Copy link
Contributor Author

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!

Are you there @marcosmarxm

@marcosmarxm marcosmarxm changed the title Polygon-Stocks-API 馃帀 New Source: Polygon Nov 7, 2022
@marcosmarxm marcosmarxm changed the title 馃帀 New Source: Polygon 馃帀 New Source: Polygon Stocks Nov 7, 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.

Some comments.

$options:
name: "stock_api"
primary_key: "id"
path: "/v2/aggs/ticker/{{ config['stocksTicker'] }}/range/{{ config['multiplier'] }}/{{ config['timespan'] }}/{{ config['from'] }}/{{ config['to'] }}?adjusted={{ config['adjusted'] }}&sort={{ config['sort'] }}&limit=120&apiKey={{ config['apiKey'] }}"
Copy link
Member

Choose a reason for hiding this comment

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

Please overwrite the request parameter component.
Please implement the DateStreamSlicer to enable incremental syncs.
Always sort by desc to read first old to newest data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is still to be done I'll finish this soon.

Comment on lines 30 to 31
streams:
- "*ref(definitions.stock_api_stream)"
Copy link
Member

Choose a reason for hiding this comment

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

Are you going to add only this endpoint? I saw other endpoints in the API docs.

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 as I thought it is the most important end point as per my point of view

Comment on lines 36 to 45
from:
type: string
description: The beginning date for the aggregate window.
examples:
- "2020-10-14"
to:
type: string
description: The target date for the aggregate window.
examples:
- "2020-10-14"
Copy link
Member

Choose a reason for hiding this comment

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

Change from to start_date and to to end_date is more used by Airbyte's connectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this

- IBM
- MSFT
multiplier:
type: integer
Copy link
Member

Choose a reason for hiding this comment

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

Add title to your parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this

- multiplier
- timespan
- from
- to
Copy link
Member

Choose a reason for hiding this comment

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

to or end_date is not required if you implement the datestream slicer.

@Harshil0512
Copy link
Contributor Author

Okay I'll work on that and will keep you updated

@octavia-squidington-iv octavia-squidington-iv removed area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Nov 16, 2022
@marcosmarxm marcosmarxm mentioned this pull request Nov 16, 2022
37 tasks
@marcosmarxm
Copy link
Member

@Harshil0512 I had a problem when pushing some change to your branch :( I'll finish your work at #19504 Thanks so much for the contribution

@RealChrisSean same problem real, sorry!!!

@airbyteio airbyteio temporarily deployed to more-secrets November 16, 2022 21:25 Inactive
@airbyteio airbyteio temporarily deployed to more-secrets November 16, 2022 21:34 Inactive
@airbyteio airbyteio temporarily deployed to more-secrets November 16, 2022 21:34 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants