Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-09-2017 06:48 AM
Hi All,
I am trying to split a string with semicolon using the below query. In Beeline, Its thrwing me Parse execption error. But in Hive its working fine. I am properly escaping the semicolan in my query. Below is my query.
select split(fieldname,'\;') from table name
I also tried
select split(fieldname,'\\;') from table name
I also tried with double quotes. But Nothing is working in Beeline shell. But in Hive shell, no issues. Query is running fine.
Beeline is throwing below error
Error: Error while compiling statement: FAILED: ParseException line 1:29 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in select expression (state=42000,code=40000)
Kindly let me know the proper way to escape the semi colans.
Created 03-09-2017 12:27 PM
Can you try with '\073'
select split(fieldname,'\073')[0] from table name
Similar issue seen in beeswax connection used by Hue.
Created 03-09-2017 12:27 PM
Can you try with '\073'
select split(fieldname,'\073')[0] from table name
Similar issue seen in beeswax connection used by Hue.
Created 03-10-2017 10:37 AM
It worked.. Thanks..
Created 10-11-2019 10:28 PM
It really works after replacing ';' with '\073' !
I met this problem when using split and ';' in crontab hql, it returns " ParseException line 3:121 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in select expression".
Created 03-09-2017 12:57 PM
Please use backtick for column name and it will treat all characters in the field literally
Table names and column names are case insensitive.
`) is treated literally. Within a backtick string, use double backticks (``) to represent a backtick character.https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select
Created 05-16-2017 07:56 AM
it's not only an issue with split, also with eg concat. escaping a semicolon in hue works fine but beeline errors with the same error as above.
Replacing the semicolon with \073 works here as well.