- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to accommodate special character '?' in a column name in Hive
- Labels:
-
Apache Hive
Created on
‎01-28-2020
03:57 AM
- last edited on
‎01-28-2020
04:32 AM
by
ask_bill_brooks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a query where as per the requirement the column name should be 'abc xyz?'. I am using tilted quotes to accommodate the space and special characters in between column name but i am getting the below error with '?':
Parameters cannot be used with normal Statement objects, use PreparedStatements instead.
I am using SQL Workbench for connecting to Hive.
Created ‎01-28-2020 04:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would highly recommend to not use special characters in columns names. Per documentation hive .13 (link) `column?name` should work with Hive, however, there is no gauruntee that other clients, including SQL Workbench will allow this when the special character can be considered a code like character ($ % & ? " , . etc)
Created ‎01-28-2020 04:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would highly recommend to not use special characters in columns names. Per documentation hive .13 (link) `column?name` should work with Hive, however, there is no gauruntee that other clients, including SQL Workbench will allow this when the special character can be considered a code like character ($ % & ? " , . etc)
Created ‎01-29-2020 03:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou Steven 🙂
