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

[Bug]: Error from snowflake__get_model_executions_dml_sql missing value #385

Closed
kenpokiwi opened this issue Sep 20, 2023 · 2 comments · Fixed by #386
Closed

[Bug]: Error from snowflake__get_model_executions_dml_sql missing value #385

kenpokiwi opened this issue Sep 20, 2023 · 2 comments · Fixed by #386
Labels
bug Something isn't working

Comments

@kenpokiwi
Copy link
Contributor

Overview

When called following a failed call to a macro, the insert into model_executions generated is missing a value. "Inconsistent number of values in the VALUES clause expecting 16 but got 15".

How to reproduce

Build a model that calls a macro which raises a user defined compiler error "do exceptions.raise_compiler_error(err)"
Call dbt_artifacts.upload_results(results) to upload results.

Expected behaviour

Generation of a valid insert statement with the required 16 values from the snowflake__get_model_executions_dml_sql macro.

Within the {% if model.timing != [] %} block need additional "{% else %} null" block for each {% for stage in model.timing if stage.name == "" %} to catch missing stage times within timing.

Screenshots

image

Environment

Results of running dbt --version: 1.6.2

1.6.2

Please paste the contents of your packages.yml file here:

packages:
    - package: dbt-labs/dbt_utils
    version: 1.1.0
  - package: dbt-labs/dbt_external_tables
    version: 0.8.0
  - package: dbt-labs/audit_helper
    version: 0.6.0
  - package: calogica/dbt_expectations
    version: 0.8.5
    # <see https://github.com/calogica/dbt-expectations/releases/latest> for the latest version tag
  - package: brooklyn-data/dbt_artifacts
    version: 2.5.0
@kenpokiwi kenpokiwi added the bug Something isn't working label Sep 20, 2023
@kenpokiwi
Copy link
Contributor Author

Create PR: #386

@glsdown
Copy link
Contributor

glsdown commented Sep 21, 2023

Thanks @kenpokiwi for this. This is a great spot - I'll get the PR reviewed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants