cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL code against tables with '>' in headers suddenly failing?

Kayl669
New Contributor III

Just want to post this issue we're experiencing here in case other people are facing something similar. Below is the wording of the support ticket request I've raised:

SQL code that has been working is suddenly failing due to syntax errors today. There have been no changes to the Databricks runtime we use (12.2).

The SQL code that is failing interrogates tables with '>' in the field names. The error is produced when you query these tables in a subquery or CTE and then SELECT from the subquery or CTE. Our code uses backticks to enclose these field names already.

Sample error message:
[PARSE_SYNTAX_ERROR] Syntax error at or near '>'.(line 1, pos 5) == SQL == event>eventData>identityState>customerId -----^^^

5 REPLIES 5

Aviral-Bhardwaj
Esteemed Contributor III

Please provide query here, query is not visible in the question

Code in the attached .png. Can you see this? Thanks

Aviral-Bhardwaj
Esteemed Contributor III

please dont use back ticks use and whole statement should not be in `` use ' ' for value only 

Kayl669
New Contributor III

This was code that was working yesterday? You have to use backticks because the field names of the table contain characters akin to spaces?

Kayl669
New Contributor III

The point that we've got to with this is that MS Support / Databricks have acknowledged that they did something and are working on a fix. "The issue occurred due to the regression in the recent DBR maintenance release...Our engineering team is working on a hotfix for the issue, which should be implemented by tomorrow EOD"

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!