Skip to main content
Ravi
Bronze III
Nov 3, 2021 2:18 AM UTC
Solved

upto what level of dot notations can be tried in Impala query formation

we need to query an array of struct and we can see that more than 1 level of dots are not accepted in the SQL query and it throws error when such queries are executed.

e.g., select abc, def, a1.b1 from xxx where so n so --> This query executes successfully.

 

but the following:

e.g., select abc, def, a1.b1.c1 from xxx where so n so --> This query fails irrespective of us defining the correct arguments in the from section.

-------------------------------

Can someone tell how many such levels of dot notations are allowed/supported in Impala. I was unable to find any Impala document which was explaining this.

BennyZ
BennyZAnswer
Gold ⭐️
Nov 10, 2021 7:03 AM UTC

Hope the below document can answer your question. 

 

https://impala.apache.org/docs/build/html/topics/impala_struct.html

 

It looks like we have to change the query as below:

select abc, def, b1.c1 from xxx, xxx.a1 where so n so

2 replies

BennyZ
Gold ⭐️
BennyZAnswer
Gold ⭐️
Nov 10, 2021 7:03 AM UTC

Hope the below document can answer your question. 

 

https://impala.apache.org/docs/build/html/topics/impala_struct.html

 

It looks like we have to change the query as below:

select abc, def, b1.c1 from xxx, xxx.a1 where so n so

Translate
VidyaSargur
Community Manager
Community Manager
Nov 15, 2021 5:00 AM UTC

@Ravi, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.