This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
Show line number for Python model errors in dbt run #771
Labels
feature request
New feature or request
Context
When an exception is raised in a Python model run via dbt, the error output shows the string representation of the exception, but not the error type or the line number of where the exception was raised. This makes it really hard to locate where the error occurred. The log message should include the error type and line number. And, perhaps there should be an option to show or capture an entire traceback.
Is your feature request related to a problem? Please describe.
I find it difficult to debug Python models because it is hard to pinpoint where in the code an exception was raised.
Describe the solution you'd like
The error message should include the exception class and the line number from the traceback.
So, instead of the following log message:
I would like to see something like:
Describe alternatives you've considered
Run often to narrow the possible scope for an exception to occur.
Additional context
Here is an excerpted output from
dbt run
, showing an error occurred with the message "not enough values to unpack (expected 3, got 2)".The raised exception is a
ValueError
from code on line 107. But, without this information in the run output, it is very hard to figure out where the problem is in the Python model.Is there an existing feature request for this?
The text was updated successfully, but these errors were encountered: