dbt-labs / dbt-labs/dbt-codegen

`generate_source` not working with Snowflake using dbt Cloud Versionless

Open
#186 1 comment 0 reactions 0 assignees View on GitHub
bug Stale triage
Dominant language
Makefile
Stars
676
Forks
132
PR merge metrics
No merged PRs in 30d

Description

### 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](https://github.com/user-attachments/assets/1dfcabc7-94fb-4ba2-a2d9-0271309f6a09)

**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](https://github.com/user-attachments/assets/d82ed188-3c5c-4147-951d-9b56d6d23a4a)
Detailed log: [logs.txt](https://github.com/user-attachments/files/17545272/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
- [X] snowflake
- [ ] other (specify: ____________)

**The output of `dbt --version`:**
```

```
Using DBT cloud versionless

**The operating system you're using:**

**The output of `python --version`:**

### Additional context

### Are you interested in contributing the fix?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.