-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🎉 Refactor Normalization docker images and upgrade to use dbt 0.21.0 #6959
Merged
Merged
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
9709f14
Split normalization docker images for some connectors with specifics …
ChristopheDuong bd90eee
Clean up schemas
ChristopheDuong 6b7ff77
Use global version for normalization
ChristopheDuong 3aa02dc
Trying to solve oracle tests
ChristopheDuong fb7c12f
Use EnvConfigs in main()
ChristopheDuong 16addd9
test_ephemeral should use get_test_targets
ChristopheDuong f07bb4b
Postgres always in test_ephemeral targets
ChristopheDuong f5bcc85
format code
ChristopheDuong c7d3d1a
Tweak gradle dependencies
ChristopheDuong 8d4a9bc
Tweak settings.gradle
ChristopheDuong 6dd5c48
Fix test oracle
ChristopheDuong e4090ea
tweak settings.gradle
ChristopheDuong b1b7ffe
Merge remote-tracking branch 'origin/master' into split-normalization
ChristopheDuong 672ace9
format code
ChristopheDuong b2c7f70
Fix bigquery ephemeral test
ChristopheDuong f4f0cd2
Merge remote-tracking branch 'origin/master' into split-normalization
ChristopheDuong c6d3de3
Format code
ChristopheDuong f13a404
Tweak comments
ChristopheDuong be595cc
Fix tests
ChristopheDuong ae0a511
Fix integration tests
ChristopheDuong 259afe9
Merge remote-tracking branch 'origin/master' into split-normalization
ChristopheDuong ccad8c3
tweak build
ChristopheDuong e912947
Re-enable test_check_row_count
ChristopheDuong 1ad9ca4
add missing folder
ChristopheDuong 84084c8
rename test file
ChristopheDuong 5e9ded1
Spotless settings
ChristopheDuong ec677cc
Fix snowflake uppercse test
ChristopheDuong 96e1333
Fix oracle tests
ChristopheDuong 05c12e1
Apply suggestions from code review
ChristopheDuong e028ed7
Merge remote-tracking branch 'origin/master' into split-normalization
ChristopheDuong c461a8f
Add env variables to test for using external db
ChristopheDuong e48f17a
Split integration tests between simple and nested
ChristopheDuong 70afb15
Merge remote-tracking branch 'origin/master' into split-normalization
ChristopheDuong c281f1f
code format
ChristopheDuong 9f0bcc8
Add column with quotes in simple streams
ChristopheDuong 18fb503
format code
ChristopheDuong cb9889c
Fix tests
ChristopheDuong 881cb68
Cleanup dir before running tests
ChristopheDuong 2129ac8
Regenerate (#7003)
ChristopheDuong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
airbyte-integrations/bases/base-normalization/dbt-project-template-mssql/dbt_project.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This file is necessary to install dbt-utils with dbt deps | ||
# the content will be overwritten by the transform function | ||
|
||
# Name your package! Package names should contain only lowercase characters | ||
# and underscores. A good package name should reflect your organization's | ||
# name or the intended use of these models | ||
name: 'airbyte_utils' | ||
version: '1.0' | ||
config-version: 2 | ||
|
||
# This setting configures which "profile" dbt uses for this project. Profiles contain | ||
# database connection information, and should be configured in the ~/.dbt/profiles.yml file | ||
profile: 'normalize' | ||
|
||
# These configurations specify where dbt should look for different types of files. | ||
# The `source-paths` config, for example, states that source models can be found | ||
# in the "models/" directory. You probably won't need to change these! | ||
source-paths: ["models"] | ||
docs-paths: ["docs"] | ||
analysis-paths: ["analysis"] | ||
test-paths: ["tests"] | ||
data-paths: ["data"] | ||
macro-paths: ["macros"] | ||
|
||
target-path: "../build" # directory which will store compiled SQL files | ||
log-path: "../logs" # directory which will store DBT logs | ||
modules-path: "/tmp/dbt_modules" # directory which will store external DBT dependencies | ||
|
||
clean-targets: # directories to be removed by `dbt clean` | ||
- "build" | ||
- "dbt_modules" | ||
|
||
quoting: | ||
database: true | ||
# Temporarily disabling the behavior of the ExtendedNameTransformer on table/schema names, see (issue #1785) | ||
# all schemas should be unquoted | ||
schema: false | ||
identifier: true | ||
|
||
# You can define configurations for models in the `source-paths` directory here. | ||
# Using these configurations, you can enable or disable models, change how they | ||
# are materialized, and more! | ||
models: | ||
airbyte_utils: | ||
generated: | ||
airbyte_ctes: | ||
+tags: airbyte_internal_cte | ||
+materialized: ephemeral | ||
airbyte_views: | ||
+tags: airbyte_internal_views | ||
+materialized: view | ||
airbyte_tables: | ||
+tags: normalized_tables | ||
+materialized: table | ||
+materialized: table | ||
|
||
vars: | ||
dbt_utils_dispatch_list: ['airbyte_utils'] |
5 changes: 5 additions & 0 deletions
5
airbyte-integrations/bases/base-normalization/dbt-project-template-mssql/packages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# add dependencies. these will get pulled during the `dbt deps` process. | ||
|
||
packages: | ||
- git: "https://github.com/fishtown-analytics/dbt-utils.git" | ||
revision: 0.6.4 |
58 changes: 58 additions & 0 deletions
58
airbyte-integrations/bases/base-normalization/dbt-project-template-mysql/dbt_project.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This file is necessary to install dbt-utils with dbt deps | ||
# the content will be overwritten by the transform function | ||
|
||
# Name your package! Package names should contain only lowercase characters | ||
# and underscores. A good package name should reflect your organization's | ||
# name or the intended use of these models | ||
name: 'airbyte_utils' | ||
version: '1.0' | ||
config-version: 2 | ||
|
||
# This setting configures which "profile" dbt uses for this project. Profiles contain | ||
# database connection information, and should be configured in the ~/.dbt/profiles.yml file | ||
profile: 'normalize' | ||
|
||
# These configurations specify where dbt should look for different types of files. | ||
# The `source-paths` config, for example, states that source models can be found | ||
# in the "models/" directory. You probably won't need to change these! | ||
source-paths: ["models"] | ||
docs-paths: ["docs"] | ||
analysis-paths: ["analysis"] | ||
test-paths: ["tests"] | ||
data-paths: ["data"] | ||
macro-paths: ["macros"] | ||
|
||
target-path: "../build" # directory which will store compiled SQL files | ||
log-path: "../logs" # directory which will store DBT logs | ||
modules-path: "/tmp/dbt_modules" # directory which will store external DBT dependencies | ||
|
||
clean-targets: # directories to be removed by `dbt clean` | ||
- "build" | ||
- "dbt_modules" | ||
|
||
quoting: | ||
database: true | ||
# Temporarily disabling the behavior of the ExtendedNameTransformer on table/schema names, see (issue #1785) | ||
# all schemas should be unquoted | ||
schema: false | ||
identifier: true | ||
|
||
# You can define configurations for models in the `source-paths` directory here. | ||
# Using these configurations, you can enable or disable models, change how they | ||
# are materialized, and more! | ||
models: | ||
airbyte_utils: | ||
generated: | ||
airbyte_ctes: | ||
+tags: airbyte_internal_cte | ||
+materialized: ephemeral | ||
airbyte_views: | ||
+tags: airbyte_internal_views | ||
+materialized: view | ||
airbyte_tables: | ||
+tags: normalized_tables | ||
+materialized: table | ||
+materialized: table | ||
|
||
vars: | ||
dbt_utils_dispatch_list: ['airbyte_utils'] |
5 changes: 5 additions & 0 deletions
5
airbyte-integrations/bases/base-normalization/dbt-project-template-mysql/packages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# add dependencies. these will get pulled during the `dbt deps` process. | ||
|
||
packages: | ||
- git: "https://github.com/fishtown-analytics/dbt-utils.git" | ||
revision: 0.6.4 |
56 changes: 56 additions & 0 deletions
56
airbyte-integrations/bases/base-normalization/dbt-project-template-oracle/dbt_project.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This file is necessary to install dbt-utils with dbt deps | ||
# the content will be overwritten by the transform function | ||
|
||
# Name your package! Package names should contain only lowercase characters | ||
# and underscores. A good package name should reflect your organization's | ||
# name or the intended use of these models | ||
name: 'airbyte_utils' | ||
version: '1.0' | ||
config-version: 2 | ||
|
||
# This setting configures which "profile" dbt uses for this project. Profiles contain | ||
# database connection information, and should be configured in the ~/.dbt/profiles.yml file | ||
profile: 'normalize' | ||
|
||
# These configurations specify where dbt should look for different types of files. | ||
# The `source-paths` config, for example, states that source models can be found | ||
# in the "models/" directory. You probably won't need to change these! | ||
source-paths: ["models"] | ||
docs-paths: ["docs"] | ||
analysis-paths: ["analysis"] | ||
test-paths: ["tests"] | ||
data-paths: ["data"] | ||
macro-paths: ["macros"] | ||
|
||
target-path: "../build" # directory which will store compiled SQL files | ||
log-path: "../logs" # directory which will store DBT logs | ||
modules-path: "/tmp/dbt_modules" # directory which will store external DBT dependencies | ||
|
||
clean-targets: # directories to be removed by `dbt clean` | ||
- "build" | ||
- "dbt_modules" | ||
|
||
quoting: | ||
database: false | ||
schema: false | ||
identifier: false | ||
|
||
# You can define configurations for models in the `source-paths` directory here. | ||
# Using these configurations, you can enable or disable models, change how they | ||
# are materialized, and more! | ||
models: | ||
airbyte_utils: | ||
generated: | ||
airbyte_ctes: | ||
+tags: airbyte_internal_cte | ||
+materialized: ephemeral | ||
airbyte_views: | ||
+tags: airbyte_internal_views | ||
+materialized: view | ||
airbyte_tables: | ||
+tags: normalized_tables | ||
+materialized: table | ||
+materialized: table | ||
|
||
vars: | ||
dbt_utils_dispatch_list: ['airbyte_utils'] |
5 changes: 5 additions & 0 deletions
5
airbyte-integrations/bases/base-normalization/dbt-project-template-oracle/packages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# add dependencies. these will get pulled during the `dbt deps` process. | ||
|
||
packages: | ||
- git: "https://github.com/fishtown-analytics/dbt-utils.git" | ||
revision: 0.6.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 7 additions & 10 deletions
17
...tegrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/concat.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...tions/bases/base-normalization/dbt-project-template/macros/cross_db_utils/drop_schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{# | ||
Drop schema to clean up the destination database | ||
#} | ||
{% macro drop_schemas(schemas) %} | ||
{% for schema in schemas %} | ||
drop schema if exists {{ schema }} cascade; | ||
{% endfor %} | ||
{% endmacro %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, is there no way to DRY the dbt_project.yml files?