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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

on-run-end failed, error: value too long for type character varying(65535) #650

Closed
manuel-rodriguez-sonarsource opened this issue Jan 15, 2024 · 1 comment

Comments

@manuel-rodriguez-sonarsource

Hi all! 馃憢

While running dbt test we got an error saying:

on-run-end failed, error:
 value too long for type character varying(65535)

After digging a bit, I found that the culprit is one of our unit-test for some macros, where we generate the test code using jinja to assert several conditions.
The compiled code ends up in a really long file. I found that your run-end hook calls several macros, but I got a bit lost in there. I guess that one of these macros is trying to upload the compiled code into a VARCHAR or TEXT variable (in Redshift) causing it to overflow (since the max size for a VARCHAR in Redshift is 65535).

Some more details about my env:

I'm running on Redshift using dbt core.

dbt version: 1.7.4
dbt-redshift: 1.7.1
elementary dbt-package: 0.13.0
edr version: 0.13.2

I'm just posting the issue, so I don't want to lead to any solution before is checked that it's not just a singular thing, but an easy solution would be to truncate every string saved to the max size or the TEXT variable based on the adaptor.

@haritamar
Copy link
Collaborator

Hi @manuel-rodriguez-sonarsource !
Thanks a lot for opening this issue, and very sorry we are only just responding to it.

This is actually a bit surprising since we do truncate this value here, where get_column_size returns exactly 65535 for Redshift.

In any case, since it's been a while I'll go ahead and close this issue but if still relevant please feel free to open a new issue in the main Elementary repo (we are trying to concentrate issue management there).

Thank you!
Itamar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants