Skip to content

🚨 Snowflake produces permanent tables 🚨 - #9063

Merged
Edward Gao (edgao) merged 38 commits into
masterfrom
edgao/snowflake_permanent_tables
Jan 6, 2022
Merged

🚨 Snowflake produces permanent tables 🚨#9063
Edward Gao (edgao) merged 38 commits into
masterfrom
edgao/snowflake_permanent_tables

Conversation

@edgao

@edgao Edward Gao (edgao) commented Dec 22, 2021

Copy link
Copy Markdown
Contributor

What

Based on #9072

Update Snowflake's normalization implementation to create permanent (i.e. non-transient) tables.

Tests are failing with permissions errors - they were passing a few days ago locally, but I've never actually gotten them to pass on CI.

How

Actual changes:

Misc stuff:

Recommended reading order

  1. dbt-project-template-snowflake/dbt_project.yml https://github.com/airbytehq/airbyte/pull/9063/files#diff-a3013753d23a3346c19fb8db134401bc98f51a047e60af58c8916870b2553643R44
  2. snowflake.Dockerfile https://github.com/airbytehq/airbyte/pull/9063/files#diff-bc15f033fdc4290ed33262b92dbf18e5e52d86975f8403f731af9ffc76c9f7eeR15
  3. SnowflakeInsertDestinationAcceptanceTest.java
  4. Markdown files
  5. build.gradle, docker-compose stuff
  6. everything in normalization_test_output

🚨 User Impact 🚨

sort of - new tables will be created as permanent, so users who want to continue creating transient tables will need to create a new transient database for airbyte

Pre-merge Checklist

Expand the relevant checklist and delete the others.

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 area/platform issues related to the platform area/worker Related to worker normalization labels Dec 22, 2021
@edgao Edward Gao (edgao) changed the title Snowflake produces permanent tables 🚨🚨 Snowflake produces permanent tables Dec 22, 2021
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 19:20 Inactive
@edgao Edward Gao (edgao) changed the title 🚨🚨 Snowflake produces permanent tables 🚨 Snowflake produces permanent tables 🚨 Dec 22, 2021
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 19:56 Inactive
@edgao
Edward Gao (edgao) force-pushed the edgao/snowflake_permanent_tables branch from 4980acb to 54da45c Compare December 22, 2021 21:19
@edgao

Edward Gao (edgao) commented Dec 22, 2021

Copy link
Copy Markdown
Contributor Author

/test connector=bases/base-normalization

πŸ•‘ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1613099842
❌ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1613099842
πŸ›

@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 21:20 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets December 22, 2021 21:21 Inactive
@edgao

Edward Gao (edgao) commented Dec 22, 2021

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-snowflake

πŸ•‘ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1613112056
❌ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1613112056
πŸ›

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets December 22, 2021 21:25 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 22:12 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 22:23 Inactive
@edgao

Edward Gao (edgao) commented Dec 22, 2021

Copy link
Copy Markdown
Contributor Author

/test connector=bases/base-normalization

πŸ•‘ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1613276555
❌ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/1613276555
πŸ›

@edgao

Edward Gao (edgao) commented Dec 22, 2021

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-snowflake

πŸ•‘ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1613276690
❌ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1613276690
πŸ›

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets December 22, 2021 22:25 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets December 22, 2021 22:25 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 22, 2021 22:56 Inactive
@github-actions github-actions Bot added the area/connectors Connector related issues label Dec 23, 2021
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 23, 2021 16:46 Inactive
@edgao
Edward Gao (edgao) force-pushed the edgao/snowflake_permanent_tables branch from b3a8ea3 to 24643b7 Compare December 23, 2021 17:49
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 23, 2021 17:51 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets December 24, 2021 00:32 Inactive
@edgao
Edward Gao (edgao) force-pushed the edgao/snowflake_permanent_tables branch from 1292ebb to d8abb0c Compare January 5, 2022 00:04
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 5, 2022 00:06 Inactive
Base automatically changed from marcos/test-pr-9029 to master January 5, 2022 02:28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for providing the reading order, it was super helpful

@@ -0,0 +1,33 @@
FROM fishtownanalytics/dbt:0.21.1
COPY --from=airbyte/base-airbyte-protocol-python:0.1.1 /airbyte /airbyte

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need to get this docker image anymore? can't we just pip install airbyte-cdk which contains the CDK models? not blocking but a good sweep

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

is the COPY command equivalent to that pip install? (looks like the the docker image just contains base_python_structs)


public abstract class DestinationAcceptanceTest {

private static final String NORMALIZATION_VERSION = "dev";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❀️

@@ -0,0 +1,33 @@
FROM fishtownanalytics/dbt:0.21.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are we creating a special dockerfile for snowflake because it's DBT yamls deviate from the standard yamls?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah. Chris suggested modifying entrypoint.sh to use the modified yaml instead of publishing a new docker image, but my thinking was to keep entrypoint.sh integration-agnostic.

Comment thread docs/integrations/destinations/snowflake.md Outdated
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 5, 2022 18:18 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 5, 2022 21:01 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 6, 2022 00:24 Inactive
@edgao

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/destination-snowflake

@edgao

Edward Gao (edgao) commented Jan 6, 2022

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/destination-snowflake

πŸ•‘ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1663877333
βœ… connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/1663877333

@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 6, 2022 16:30 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets January 6, 2022 16:31 Inactive
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 6, 2022 18:05 Inactive
@edgao
Edward Gao (edgao) merged commit b6926d4 into master Jan 6, 2022
@edgao
Edward Gao (edgao) deleted the edgao/snowflake_permanent_tables branch January 6, 2022 18:10
@edgao
Edward Gao (edgao) temporarily deployed to more-secrets January 6, 2022 18:11 Inactive
@edgao

Edward Gao (edgao) commented Jan 6, 2022

Copy link
Copy Markdown
Contributor Author

/publish connector=bases/base-normalization

Error: No ref found for: edgao/snowflake_permanent_tables

@ChristopheDuong

Copy link
Copy Markdown
Contributor

Closes #6743

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 area/platform issues related to the platform area/worker Related to worker connectors/destination/snowflake connectors/destinations-warehouse normalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants