-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
DBT project for Airbyte normalization #802
Conversation
3586fc7
to
cf7b921
Compare
airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py
Show resolved
Hide resolved
airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py
Show resolved
Hide resolved
airbyte-integrations/bases/base-normalization/normalization/transform_catalog/transform.py
Outdated
Show resolved
Hide resolved
…into normalization
.gitignore
Outdated
@@ -15,3 +15,8 @@ __pycache__ | |||
.venv | |||
.mypy_cache | |||
|
|||
# dbt | |||
profiles.yml |
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.
do we expect profiles.yml
to be in the airbyte
git repo at all?
@@ -31,7 +31,7 @@ | |||
author_email="[email protected]", | |||
url="https://github.com/airbytehq/airbyte", | |||
packages=setuptools.find_packages(), | |||
install_requires=["airbyte-protocol", "dbt==0.18.1"], | |||
install_requires=["airbyte-protocol", "dbt>=0.18.1", "pyyaml"], |
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.
What's the benefit of allowing > versions of dbt? Shouldn't we bump the version to upgrade?
airbyte-integrations/connectors/destination-bigquery/src/main/resources/spec.json
Outdated
Show resolved
Hide resolved
airbyte-integrations/bases/base-normalization/integration_tests/one_recipe.json
Outdated
Show resolved
Hide resolved
airbyte-integrations/bases/base-normalization/dbt-project-template/packages.yml
Outdated
Show resolved
Hide resolved
@@ -10,6 +10,9 @@ WORKDIR /airbyte/normalization_code | |||
COPY normalization ./normalization | |||
COPY setup.py . | |||
RUN pip install . | |||
COPY dbt-project-template/macros ./dbt-template/macros |
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.
can you do
COPY dbt-project-template/ ./dbt-template/
Instead?
Make DBT SQL more generic and handle postgres special cases in the macros instead
… destination warehouses
dry run is calling Compiling is translating DBT SQL Models into the warehouse's SQL but doesn't actually run it against the warehouse so it does not perform any changes on the destination. We can use that to check for syntax errors |
{%- endmacro %} | ||
|
||
{% macro snowflake__unnest(array_col) -%} | ||
-- TODO test this!! not so sure yet... |
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.
is it working?
@@ -23,4 +23,5 @@ application { | |||
|
|||
buildImage.dependsOn(assemble) | |||
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage') | |||
buildImage.dependsOn(':airbyte-integrations:bases:base-normalization:buildImage') |
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.
why do we need that?
@@ -24,4 +24,5 @@ application { | |||
|
|||
buildImage.dependsOn(assemble) | |||
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage') | |||
buildImage.dependsOn(':airbyte-integrations:bases:base-normalization:buildImage') |
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.
why do we need that?
@@ -24,5 +24,6 @@ application { | |||
} | |||
|
|||
buildImage.dependsOn(assemble) | |||
buildImage.dependsOn(':airbyte-integrations:bases:base-normalization:buildImage') |
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.
why do we need that?
@@ -43,7 +43,7 @@ | |||
|
|||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultNormalizationRunner.class); | |||
|
|||
public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:0.1.0"; | |||
public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:dev"; |
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.
can you create an issue with the proper milestone so we fix that before releasing?
@@ -49,6 +49,9 @@ def createSpotlessTarget = { pattern -> | |||
'.mypy_cache', | |||
'.venv', | |||
'*.egg-info', | |||
'dbt-project-template/macros', |
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.
do you need the three? can't you just do dbt-project-template/
?
What
To solve #782, let's make a prototype of conversion from json schemas to DBT models
(running first on BigQuery)