brooklyn-data / dbt_artifacts

A dbt package for modelling dbt metadata. https://brooklyn-data.github.io/dbt_artifacts
Apache License 2.0
309 stars 113 forks source link

[Bug]: Upload model is having incorrect column order #392

Closed il-dat closed 9 months ago

il-dat commented 9 months ago

Overview

The model.sql model has the columns in following order:

But the macro (upload result) is following the reversed order:

How to reproduce

Encountered in snowflake and dbt-artifacts v2.6.0

Expected behaviour

Make sure the column order is matching to the upload macros

Screenshots

image

Environment

Results of running dbt --version: 1.6 latest

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

packages:
  - package: dbt-labs/dbt_utils
    version: 1.1.1
  - package: dbt-labs/codegen
    version: 0.10.0
  - package: dbt-labs/dbt_project_evaluator
    version: 0.7.3
  - package: infinitelambda/dq_tools
    version: [">=1.4.0", "<1.5.0"]
  - package: get-select/dbt_snowflake_monitoring
    version: 4.5.1
  - package: brooklyn-data/dbt_artifacts
    version: [">=2.6.0", "<2.7.0"]
glsdown commented 9 months ago

Once again thanks for raising and spotting this. I've now merged the PR and created a release with it in. Please do reach out if there is anything else you spot.