Skip to content

generate_source not working with Snowflake using dbt Cloud Versionless #186

@MikeHermus

Description

@MikeHermus

Describe the bug

I want to add a new source (in Snowflake) to my project by using the generate_source macro, but since recently it is resulting in errors which aren't clear. When I try to run the same macro as an operation in the commandline there seems to be a bit more information available on the error.

Steps to reproduce

1. Compile the macro which looks like this to retrieve the source from Snowflake:

{{
    codegen.generate_source(
        schema_name="jarvis",
        database_name="master_data_prod",
        generate_columns=true,
        include_data_types=true,
        include_descriptions=true,
        include_schema=true,
    )
}}

Resulting error:
image

2. Run the macro via the commandline:
dbt run-operation generate_source --args '{"schema_name":"jarvis", "database_name":"master_data_prod", "generate_columns":true, "include_data_types":true, "include_descriptions":true, "include_schema":true}'

Resulting error(s):
image
Detailed log: logs.txt

Expected results

An output yaml of my new source

Actual results

See errors in "steps to reproduce"

Screenshots and log output

See errors in "steps to reproduce"

System information

The contents of your packages.yml file:
packages:

  • package: dbt-labs/codegen
    version: 0.12.1

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

<output goes here>

Using DBT cloud versionless

The operating system you're using:

The output of python --version:

Additional context

Are you interested in contributing the fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions