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.
Please use backtick for column name and it will treat all characters in the field literally
Table names and column names are case insensitive.
In Hive 0.12 and earlier, only alphanumeric and underscore characters are allowed in table and column names.
In Hive 0.13 and later, column names can contain any Unicode character (see HIVE-6013). Any column name that is specified within backticks (`) is treated literally. Within a backtick string, use double backticks (``) to represent a backtick character.