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

Add model attributes #212

Merged
merged 5 commits into from
Oct 3, 2022
Merged

Conversation

ahmedrad
Copy link
Contributor

Adding more attributes to the models (meta and tags fields from the manifest)

@ahmedrad ahmedrad temporarily deployed to Approve Integration Tests September 30, 2022 02:06 Inactive
@ahmedrad ahmedrad had a problem deploying to Approve Integration Tests September 30, 2022 02:06 Failure
@ahmedrad ahmedrad temporarily deployed to Approve Integration Tests September 30, 2022 02:06 Inactive
@ahmedrad ahmedrad temporarily deployed to Approve Integration Tests September 30, 2022 02:06 Inactive
@@ -34,3 +34,5 @@

{%- endmacro %}

{% macro default__insert_into_metadata_table(database_name, schema_name, table_name, content) -%}
{%- endmacro %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed @ahmedrad ?

Copy link
Contributor Author

@ahmedrad ahmedrad Oct 2, 2022

Choose a reason for hiding this comment

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

we have a project that uses both redshift and snowflake connectors. the dbt artifacts hooks and models are only enabled on snowflake via the config but the compilation throws an error all together because this default method was missing. i dont think its a graceful way to fail on an unsupported connector and I cant find another way to install the package on a project that has some redshift models without failing compilation. open to other suggestions though!

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes total sense @ahmedrad ! Thanks for explaining.

@NiallRees
Copy link
Contributor

Thank you @ahmedrad!

macros/upload_models.sql Outdated Show resolved Hide resolved
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 09:47 Inactive
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 09:47 Inactive
@NiallRees NiallRees had a problem deploying to Approve Integration Tests September 30, 2022 09:47 Failure
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 09:47 Inactive
macros/upload_models.sql Outdated Show resolved Hide resolved
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:01 Inactive
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:01 Inactive
@NiallRees NiallRees had a problem deploying to Approve Integration Tests September 30, 2022 10:01 Failure
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:01 Inactive
macros/upload_models.sql Outdated Show resolved Hide resolved
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:04 Inactive
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:04 Inactive
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:04 Inactive
@NiallRees NiallRees temporarily deployed to Approve Integration Tests September 30, 2022 10:04 Inactive
cast(null as {{ type_string() }}) as materialization
cast(null as {{ type_string() }}) as materialization,
cast(null as {{ type_array() }}) as tags,
cast(null as {{ type_json() }}) as meta
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NiallRees I'm not sure what the linter is complaining about, I can't see any trailing whitespace on those lines!

Copy link

@jelstongreen jelstongreen Oct 3, 2022

Choose a reason for hiding this comment

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

@ahmedrad There is a bug with SQLFluff atm for L001 - sqlfluff/sqlfluff#3851 - We managed to fix by reverting to 1.2.1.

@NiallRees NiallRees merged commit 19bce85 into brooklyn-data:main Oct 3, 2022
@jelstongreen
Copy link

@NiallRees Apologies, I am naive to releases / working from main branch - will there be a release for this commit or how does it work normally?

@NiallRees
Copy link
Contributor

@NiallRees Apologies, I am naive to releases / working from main branch - will there be a release for this commit or how does it work normally?

Hi @jelstongreen, that's all good! We'll aim to get another release out this week which will include the commit, and that will make it available via the dbt hub. If you want it straight away though, you can always use this in your packages.txt:

packages:
  - git: "https://github.com/brooklyn-data/dbt_artifacts.git"
    revision: "19bce85e7125f073a749739095ae5676b31b7d4a"

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.

3 participants