fivetran / dbt_shopify_source

Fivetran's Shopify source dbt package
https://fivetran.github.io/dbt_shopify_source/
Apache License 2.0
29 stars 22 forks source link

[Bug] Transactions staging table fails on invalid identifier #76

Closed mjrsnyder closed 1 year ago

mjrsnyder commented 1 year ago

Is there an existing issue for this?

Describe the issue

When running dbt run I receive the error attached below.

The stg_shopify__transaction.sql model is referencing the authorization column by authorization_code which does not match my environment or the ERD supplied by Fivetran.

Relevant error log or model output

[info ] [MainThread]: Completed with 1 error and 0 warnings: 
[info ] [MainThread]:  
[error] [MainThread]: Database Error in model stg_shopify__transaction (models/stg_shopify__transaction.sql) 
[error] [MainThread]:   000904 (42000): SQL compilation error: error line 372 at position 18
[error] [MainThread]:   invalid identifier 'AUTHORIZATION'
[error] [MainThread]:   compiled Code at target/run/shopify_source/models/stg_shopify__transaction.sql

Expected behavior

I expect the authorization column to either be renamed to authorization_code or persist as authorization without an error being thrown

dbt Project configurations

    shopify_database: 'raw' 
    shopify_union_schemas: ['shopify_1', 'shopify_2', 'shopify_3']
    shopify_source:
      transaction_pass_through_columns:
        - name: "authorization"
      product_variant_pass_through_columns:
        - name: "requires_shipping"
      order_pass_through_columns:
        - name: reference
        - name: source_identifier

Package versions

What database are you using dbt with?

snowflake

dbt Version

1.3.1

Additional Context

No response

Are you willing to open a PR to help address this issue?

mjrsnyder commented 1 year ago

Nevermind... I see I had a pass through column for authorization that was causing this issue.