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

DBT project for Airbyte normalization #802

Merged
merged 21 commits into from Nov 6, 2020
Merged

DBT project for Airbyte normalization #802

merged 21 commits into from Nov 6, 2020

Conversation

ChristopheDuong
Copy link
Contributor

What

To solve #782, let's make a prototype of conversion from json schemas to DBT models
(running first on BigQuery)

@ChristopheDuong ChristopheDuong marked this pull request as ready for review November 5, 2020 17:04
.gitignore Outdated
@@ -15,3 +15,8 @@ __pycache__
.venv
.mypy_cache

# dbt
profiles.yml
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 expect profiles.yml to be in the airbyte git repo at all?

.gitignore Outdated Show resolved Hide resolved
@@ -31,7 +31,7 @@
author_email="contact@airbyte.io",
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"],
Copy link
Contributor

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?

@@ -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
Copy link
Contributor

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?

build.gradle Outdated Show resolved Hide resolved
@ChristopheDuong
Copy link
Contributor Author

ChristopheDuong commented Nov 6, 2020

What's the difference between dry run and run?

dry run is calling dbt compile vs run calling dbt run

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...
Copy link
Contributor

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')
Copy link
Contributor

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')
Copy link
Contributor

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')
Copy link
Contributor

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";
Copy link
Contributor

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',
Copy link
Contributor

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/ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants