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: start using new S3StreamCopier, and expose the purgeStagingData option #9531

Merged

Conversation

etsybaev
Copy link
Contributor

@etsybaev etsybaev commented Jan 16, 2022

What

Currently, Snowflake uses Deprecated own s3 writer

How

Updated connector to use central s3 writer in the same way like we already have for Redshift connector

Selected "dev" image with changes to use:
Selection_399

2 streams selected to migrate from test Postgres source to Snoflake:
Tested on UI locally
Selection_397
Selection_396

Result on Snowflake:
Selection_398

🚨 User Impact 🚨

PurgeStagingData option is added

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

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
  • 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
  • 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
  • After the new connector version is published, connector version bumped in the seed directory 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

@github-actions github-actions bot added the area/connectors Connector related issues label Jan 16, 2022
@etsybaev etsybaev temporarily deployed to more-secrets January 16, 2022 14:37 Inactive
…-stream-copier

# Conflicts:
#	airbyte-integrations/connectors/destination-snowflake/src/test/java/io/airbyte/integrations/destination/snowflake/SnowflakeDestinationTest.java
@etsybaev etsybaev temporarily deployed to more-secrets January 16, 2022 16:51 Inactive
@etsybaev etsybaev requested a review from mkhokh-33 January 17, 2022 08:33
@etsybaev etsybaev requested a review from mkhokh-33 January 17, 2022 14:26
@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 17, 2022

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1708438468
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1708438468
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    13      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     155      8    95%
	 normalization/transform_catalog/reserved_keywords.py                 13      0   100%
	 normalization/transform_catalog/stream_processor.py                 520    333    36%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         148     34    77%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1258    525    58%

@etsybaev etsybaev temporarily deployed to more-secrets January 17, 2022 14:28 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 17, 2022 14:29 Inactive
@etsybaev etsybaev changed the title [DRAFT_PR_IGNORE_IT][8820] Destination-snowflake: start using new S3StreamCopier, and exp… 🎉 Destination-snowflake: start using new S3StreamCopier, and expose the purgeStagingData option Jan 18, 2022
@etsybaev etsybaev marked this pull request as ready for review January 18, 2022 10:50
@etsybaev etsybaev requested review from tuliren and removed request for edgao January 18, 2022 16:13
@@ -22,7 +22,7 @@
Put the contents of the `Snowflake Integration Test Config` secret on Rippling under the `Engineering` folder into `secrets/config.json` to be able to run integration tests locally.

1. Put the contents of the `destination snowflake - insert test creds` LastPass secret into `secrets/insert_config.json`.
1. Put the contents of the `destination snowflake - insert staging test creds` secret into `insert_staging_config.json`.
1. Put the contents of the `destination snowflake - insert staging test creds` secret into `internal_staging_config.json`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be secrets/internal_staging_config?

Copy link
Contributor Author

@etsybaev etsybaev Jan 19, 2022

Choose a reason for hiding this comment

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

Have no idea :) I just aligned documentation to what we actually have in codebase and secret manager

@etsybaev etsybaev temporarily deployed to more-secrets January 19, 2022 16:26 Inactive
@etsybaev etsybaev temporarily deployed to more-secrets January 19, 2022 17:30 Inactive
@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 19, 2022

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1719424923
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1719424923
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    13      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     155      8    95%
	 normalization/transform_catalog/reserved_keywords.py                 13      0   100%
	 normalization/transform_catalog/stream_processor.py                 520    333    36%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         148     34    77%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1258    525    58%

@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 19, 2022

/test connector=connectors/destination-redshift

🕑 connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/1719427262
✅ connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/1719427262
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    13      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     155      8    95%
	 normalization/transform_catalog/reserved_keywords.py                 13      0   100%
	 normalization/transform_catalog/stream_processor.py                 520    333    36%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         148     34    77%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1258    525    58%

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 19, 2022 17:49 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 19, 2022 17:49 Inactive
@etsybaev etsybaev temporarily deployed to more-secrets January 20, 2022 16:28 Inactive
@etsybaev etsybaev requested a review from edgao January 20, 2022 16:29
Copy link
Contributor

@edgao edgao left a comment

Choose a reason for hiding this comment

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

nice! :shipit:

@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 20, 2022

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1724681686
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1724681686
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    13      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     155      8    95%
	 normalization/transform_catalog/reserved_keywords.py                 13      0   100%
	 normalization/transform_catalog/stream_processor.py                 520    333    36%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         148     34    77%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1258    525    58%

@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 20, 2022

/test connector=connectors/destination-redshift

🕑 connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/1724683120
✅ connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/1724683120
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    13      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     155      8    95%
	 normalization/transform_catalog/reserved_keywords.py                 13      0   100%
	 normalization/transform_catalog/stream_processor.py                 520    333    36%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         148     34    77%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1258    525    58%

@etsybaev etsybaev temporarily deployed to more-secrets January 20, 2022 17:21 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 20, 2022 17:23 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 20, 2022 17:23 Inactive
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jan 20, 2022
@etsybaev
Copy link
Contributor Author

etsybaev commented Jan 20, 2022

/publish connector=connectors/destination-snowflake

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

@etsybaev etsybaev temporarily deployed to more-secrets January 20, 2022 18:47 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 20, 2022 18:49 Inactive
@etsybaev etsybaev merged commit 9fe804a into master Jan 20, 2022
@etsybaev etsybaev deleted the etsybaev/8820-destination-snowlake-use-new-stream-copier branch January 20, 2022 20:21
@etsybaev etsybaev temporarily deployed to more-secrets January 20, 2022 20:23 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snowflake S3 copy destination should use the updated S3StreamCopier, and expose the purgeStagingData option
6 participants