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]: Syntax error while creating all staging models in dbt artifacts #422

Open
TanviBhagwat23 opened this issue Mar 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@TanviBhagwat23
Copy link

TanviBhagwat23 commented Mar 20, 2024

Overview

While implementing dbt artifacts it gives syntax error for all staging models :

SQL compilation error: syntax error line 14 at position 66 unexpected ','. syntax error line 14 at position 115 unexpected 'as'. syntax error line 14 at position 123 unexpected ')'. syntax error line 14 at position 125 unexpected 'as'.
This is due to '-' getting appended instead of || in macro generate_surrogate_key.sql

How to reproduce

Expected behaviour

It was expected to generate below statement instead
select
md5(cast(coalesce(cast(command_invocation_id as TEXT), '') || '-' || coalesce(cast(node_id as TEXT), '') as TEXT)) as model_execution_id

Screenshots

dbt_metrics_issue

Environment

Results of running dbt --version: 1.2

# Add the results here

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

packages:
  ...

packages:

@TanviBhagwat23 TanviBhagwat23 added the bug Something isn't working label Mar 20, 2024
@TanviBhagwat23
Copy link
Author

packages:

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
Development

No branches or pull requests

1 participant