dataform-co / dataform-web-tracking

Dataform is a collaborative data modelling platform that enables analysts and engineers to manage complex data models in SQL
https://dataform.co
MIT License
2 stars 0 forks source link

SQL validation errors on Redshift don't have line numbers #170

Closed dwl285 closed 4 years ago

dwl285 commented 5 years ago

We don't currently show line numbers with query validation errors for Redshift. The redshift console shows position (which we don't), so it looks like we are potentially missing part of the error message in what we display.

Example Query:

select
1 ast test

Dataform error message: error: syntax error at or near "test" Redshift console error message: [Amazon](500310) Invalid operation: syntax error at or near "test" Position: 14;

BenBirt commented 5 years ago

from @lewish in the other issue:

Redshift seems to split errors into the top level error and then additional details. These additional details don't get propagated anywhere, and leaves some high level messages such as the following that are hard to debug:

Assert
deadlock detected

Additionally, it appears line/column number information is available, but we don't show it.

We should look at all the fields that redshift errors might have and make sure they get added to the overall error message.