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

[CT-394] [BUG] Console Log doesn't show model for Database Error #4894

Closed
1 task done
spuders opened this issue Mar 17, 2022 · 4 comments
Closed
1 task done

[CT-394] [BUG] Console Log doesn't show model for Database Error #4894

spuders opened this issue Mar 17, 2022 · 4 comments
Labels
bug Something isn't working jira logging more_information_needed stale Issues that have gone stale

Comments

@spuders
Copy link

spuders commented Mar 17, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behaviour

When dbt run results in an database error at the end of the log information in console there is no information regarding the failing model. You have to scroll through the complete logging information to see which model fails.

20:14:54  
20:14:54  Finished running 1 view model in 0.33s.
20:14:54  
20:14:54  Completed with 1 error and 0 warnings:
20:14:54  
20:14:54  ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Falsche Syntax in der Nähe des as-Schlüsselworts. (156) (SQLMoreResults)')
20:14:54  
20:14:54  Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1

Expected Behaviour

As it was in previous versions. With concrete information like Database Error in model stg_orders (models/staging/stg_orders.sql)

20:14:54  
20:14:54  Finished running 1 view model in 0.33s.
20:14:54  
20:14:54  Completed with 1 error and 0 warnings:
20:14:54  Database Error in model error (models/playground/error.sql)
20:14:54  ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Falsche Syntax in der Nähe des as-Schlüsselworts. (156) (SQLMoreResults)')
20:14:54  
20:14:54  Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1

Steps to reproduce

Run simple model with an SQL Error

SELECT AS ERROR

This should result in an database error and an information which model failed.

What database are you using dbt with?

SQL Server

Additional context

I upgraded from dbt version 0.19.2 to 1.0.3. Since that I have this behaviour

@iknox-fa
Copy link
Contributor

Hi @spuders thanks for the bug report! I'll look into it this afternoon.

@iknox-fa iknox-fa removed the triage label Mar 18, 2022
@iknox-fa iknox-fa self-assigned this Mar 18, 2022
@leahwicz leahwicz added the jira label Mar 21, 2022
@github-actions github-actions bot changed the title [BUG] Console Log doesn't show model for Database Error [CT-394] [BUG] Console Log doesn't show model for Database Error Mar 21, 2022
@stu-k
Copy link
Contributor

stu-k commented Apr 15, 2022

@spuders Thanks again for submitting the issue! Apologies for the long response time.
I wasn't able to determine whether this issue is coming from this repository, or the the SQLServer adapter repo, so we'll have to do a little more digging on this one.

There is a known issue in the SQL Server Adapter codebase that may be the cause of this issue. Though if the issue lies within dbt-core, it likely has to do with the way errors are being printed.

If any other community members or dbt-sqlserver adapter users have experienced this or similar issues, we would appreciate your input!

@stu-k stu-k added bug Something isn't working and removed triage labels Apr 15, 2022
@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Oct 18, 2022
@github-actions
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira logging more_information_needed stale Issues that have gone stale
Projects
None yet
Development

No branches or pull requests

5 participants