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

🚨 Snowflake produces permanent tables 🚨 #9063

Merged
merged 38 commits into from
Jan 6, 2022

Conversation

edgao
Copy link
Contributor

@edgao edgao commented Dec 22, 2021

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 edgao changed the title Snowflake produces permanent tables 🚨🚨 Snowflake produces permanent tables Dec 22, 2021
@edgao edgao temporarily deployed to more-secrets December 22, 2021 19:20 Inactive
@edgao edgao changed the title 🚨🚨 Snowflake produces permanent tables 🚨 Snowflake produces permanent tables 🚨 Dec 22, 2021
@edgao edgao temporarily deployed to more-secrets December 22, 2021 19:56 Inactive
@edgao edgao force-pushed the edgao/snowflake_permanent_tables branch from 4980acb to 54da45c Compare December 22, 2021 21:19
@edgao
Copy link
Contributor Author

edgao commented Dec 22, 2021

/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 edgao temporarily deployed to more-secrets December 22, 2021 21:20 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 22, 2021 21:21 Inactive
@edgao
Copy link
Contributor Author

edgao commented Dec 22, 2021

/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 jrhizor temporarily deployed to more-secrets December 22, 2021 21:25 Inactive
@edgao edgao temporarily deployed to more-secrets December 22, 2021 22:12 Inactive
@edgao edgao temporarily deployed to more-secrets December 22, 2021 22:23 Inactive
@edgao
Copy link
Contributor Author

edgao commented Dec 22, 2021

/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
Copy link
Contributor Author

edgao commented Dec 22, 2021

/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 jrhizor temporarily deployed to more-secrets December 22, 2021 22:25 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 22, 2021 22:25 Inactive
@edgao 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 edgao temporarily deployed to more-secrets December 23, 2021 16:46 Inactive
@edgao edgao force-pushed the edgao/snowflake_permanent_tables branch from b3a8ea3 to 24643b7 Compare December 23, 2021 17:49
@edgao edgao temporarily deployed to more-secrets December 23, 2021 17:51 Inactive
@edgao edgao temporarily deployed to more-secrets December 24, 2021 00:32 Inactive
@edgao edgao force-pushed the edgao/snowflake_permanent_tables branch from 1292ebb to d8abb0c Compare January 5, 2022 00:04
@edgao 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
Contributor

@sherifnada sherifnada left a comment

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
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
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)

@@ -79,6 +79,8 @@

public abstract class DestinationAcceptanceTest {

private static final String NORMALIZATION_VERSION = "dev";
Copy link
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
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
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.

docs/integrations/destinations/snowflake.md Outdated Show resolved Hide resolved
Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
@edgao edgao temporarily deployed to more-secrets January 5, 2022 18:18 Inactive
@edgao edgao temporarily deployed to more-secrets January 5, 2022 21:01 Inactive
@edgao edgao temporarily deployed to more-secrets January 6, 2022 00:24 Inactive
@edgao
Copy link
Contributor Author

edgao commented Jan 6, 2022

/publish connector=connectors/destination-snowflake

@edgao
Copy link
Contributor Author

edgao commented Jan 6, 2022

/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 edgao temporarily deployed to more-secrets January 6, 2022 16:30 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets January 6, 2022 16:31 Inactive
@edgao edgao temporarily deployed to more-secrets January 6, 2022 18:05 Inactive
@edgao edgao merged commit b6926d4 into master Jan 6, 2022
@edgao edgao deleted the edgao/snowflake_permanent_tables branch January 6, 2022 18:10
@edgao edgao temporarily deployed to more-secrets January 6, 2022 18:11 Inactive
@edgao
Copy link
Contributor Author

edgao commented Jan 6, 2022

/publish connector=bases/base-normalization

Error: No ref found for: edgao/snowflake_permanent_tables

@ChristopheDuong
Copy link
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.

None yet

7 participants