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

AviralBhardwaj

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 

AviralBhardwaj

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"

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group