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

🐛 Destination snowflake: split the snowflake insert query into multiple queries with a specific batch size #5783

Merged
merged 23 commits into from
Sep 24, 2021

Conversation

andriikorotkov
Copy link
Contributor

@andriikorotkov andriikorotkov commented Sep 1, 2021

What

Sync succeeded but destination snowflake tables are empty

How

Split the snowflake insert query into multiple queries with a specific batch size. It is second part of fix this bug.

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
    • 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
    • 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.

…4745-snowflake-destination-fix

� Conflicts:
�	airbyte-integrations/connectors/destination-snowflake/src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeSqlOperations.java
@github-actions github-actions bot added the area/connectors Connector related issues label Sep 1, 2021
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Sep 1, 2021
Copy link
Contributor

@etsybaev etsybaev left a comment

Choose a reason for hiding this comment

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

Basically LGTM, but:

  1. please make sure all check\tests passed before moving forward.
  2. Update main connector's documentation explicitly - add new param to configs list description, etc (where else may be needed)

@andriikorotkov
Copy link
Contributor Author

andriikorotkov commented Sep 2, 2021

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1194940888
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1194940888

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 16:19 Inactive
…4745-snowflake-destination-fix

� Conflicts:
�	airbyte-config/init/src/main/resources/config/STANDARD_DESTINATION_DEFINITION/424892c4-daac-4491-b35d-c6688ba547ba.json
�	airbyte-config/init/src/main/resources/seed/destination_definitions.yaml
�	airbyte-integrations/connectors/destination-snowflake/Dockerfile
�	docs/integrations/destinations/snowflake.md
@andriikorotkov andriikorotkov requested review from tuliren and subodh1810 and removed request for tuliren September 3, 2021 15:15
@andriikorotkov andriikorotkov marked this pull request as ready for review September 3, 2021 15:15
Copy link
Contributor

@subodh1810 subodh1810 left a comment

Choose a reason for hiding this comment

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

Can you change the tests to use the batch logic. Currently I dont see any test which would test the new logic

@andriikorotkov andriikorotkov requested review from DoNotPanicUA and removed request for subodh1810 September 17, 2021 11:52
…4745-snowflake-destination-fix

� Conflicts:
�	airbyte-integrations/connectors/destination-jdbc/src/main/java/io/airbyte/integrations/destination/jdbc/copy/CopyConsumerFactory.java
�	airbyte-integrations/connectors/destination-jdbc/src/main/java/io/airbyte/integrations/destination/jdbc/copy/StreamCopier.java
�	airbyte-integrations/connectors/destination-jdbc/src/main/java/io/airbyte/integrations/destination/jdbc/copy/gcs/GcsStreamCopier.java
�	airbyte-integrations/connectors/destination-jdbc/src/main/java/io/airbyte/integrations/destination/jdbc/copy/s3/S3StreamCopier.java
�	airbyte-integrations/connectors/destination-s3/src/test-integration/java/io/airbyte/integrations/destination/s3/S3DestinationAcceptanceTest.java
@andriikorotkov andriikorotkov temporarily deployed to more-secrets September 20, 2021 13:24 Inactive
@andriikorotkov andriikorotkov temporarily deployed to more-secrets September 21, 2021 10:33 Inactive
@andriikorotkov andriikorotkov temporarily deployed to more-secrets September 22, 2021 07:42 Inactive
@andriikorotkov andriikorotkov changed the title [DRAFT_PR_IGNORE_IT] 🐛 Destination snowflake: split the snowflake insert query into multiple queries with a specific batch size 🐛 Destination snowflake: split the snowflake insert query into multiple queries with a specific batch size Sep 22, 2021
@andriikorotkov andriikorotkov temporarily deployed to more-secrets September 24, 2021 07:01 Inactive
@andriikorotkov andriikorotkov requested review from subodh1810 and removed request for subodh1810 September 24, 2021 07:16
@andriikorotkov andriikorotkov dismissed subodh1810’s stale review September 24, 2021 07:23

this remark is not relevant. I have reverted the changes in the specified files.

@andriikorotkov andriikorotkov merged commit 3378ba4 into master Sep 24, 2021
@andriikorotkov andriikorotkov deleted the akorotkov/4745-snowflake-destination-fix branch September 24, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DEST Snowflake] - Sync succeeded but destination tables are empty
8 participants