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

stg_nodes failure #390

Closed
1 of 6 tasks
Frydafly opened this issue Oct 27, 2023 · 5 comments
Closed
1 of 6 tasks

stg_nodes failure #390

Frydafly opened this issue Oct 27, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Frydafly
Copy link

Frydafly commented Oct 27, 2023

Describe the bug

Steps to reproduce

run dbt build --select package:dbt_project_evaluator

all models pass except for stg_nodes

Expected results

stg_nodes builds

Actual results

Screenshots and log output

19:28:27  Postgres adapter: Postgres error: value too long for type character varying(600)
19:28:27  On model.dbt_project_evaluator.stg_nodes: ROLLBACK
19:28:27  Timing info for model.dbt_project_evaluator.stg_nodes (execute): 2023-10-27 19:28:19.945495 => 2023-10-27 19:28:27.953701
19:28:27  On model.dbt_project_evaluator.stg_nodes: Close
19:28:27  Database Error in model stg_nodes (models/staging/graph/stg_nodes.sql)
  value too long for type character varying(600)
  compiled Code at target/run/dbt_project_evaluator/models/staging/graph/stg_nodes.sql
19:28:27  Sending event: {'category': 'dbt', 'action': 'run_model', 'label': 'ffbb0816-d823-4323-9373-8f279dff1642', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7fdcc855dd30>]}
19:28:27  8 of 61 ERROR creating sql table model wfp_dbt_dev_1.stg_nodes ................. [ERROR in 8.04s]
19:28:27  Finished running node model.dbt_project_evaluator.stg_nodes

System information

The contents of your packages.yml file:

---
packages:
  - package: dbt-labs/dbt_utils
    version: 1.0.0
  - package: dbt-labs/audit_helper
    version: 0.7.0
  - package: dbt-labs/codegen
    version: 0.9.0
  - package: dbt-labs/metrics
    version: 1.4.1
  - package: calogica/dbt_expectations
    version: 0.10.0
  - package: dbt-labs/dbt_project_evaluator
    version: 0.6.2

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • trino/starburst
  • other (specify: ____________)

The output of dbt --version:

1.4

Additional context

Are you interested in contributing the fix?

Sure

@Frydafly Frydafly added the bug Something isn't working label Oct 27, 2023
@Frydafly
Copy link
Author

the content of the nodes seem to hit the varchar(600) limit-- I wonder if just increasing that (which is in the cross_db_shim macros, would allow this to run?

@b-per
Copy link
Collaborator

b-per commented Oct 30, 2023

Can you try adding a file under your macros folder setting up a higher value?

For example, like:

{%- macro redshift__type_string() -%}
  {{ "VARCHAR(5000)" }}
{%- endmacro %}

I'd also be interested in knowing what column would be more than 600 chars.

@ReynaldoMR3
Copy link

Hello, I had the same issue and @b-per solution of increasing the size of the varchar in a new file: macros/cross_db_shim/redshift_shims.sql.sql and removing the dispatch from dbt_project.yml I was able to run the stg_nodes

@Frydafly
Copy link
Author

Frydafly commented Nov 10, 2023 via email

@b-per
Copy link
Collaborator

b-per commented Nov 13, 2023

Thanks for the update!

@b-per b-per closed this as completed Nov 13, 2023
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

3 participants