04-30-2017 07:10 AM
What i'm trying:
- To create a table that has a special character column in Hive. iam getting an error due to hive doesn't support a special character column.
Ex: Create external table tbl1 (Sales$ float)
Why I need: iam trying to pull data from Sql server as it's the source where in the column has special char and i'm trying to replicate the source schema in Hive. iam using Sqoop tool to pull data from sql server and have it on the Hadoop.. since i create the external table in hive and it's refering to that hdfs path for data.
05-01-2017 10:13 AM - edited 05-01-2017 10:16 AM
yes, i'm able to create it with the backticks.. if i try describe formatted tablename. i see that $ sign is replaced by underscore (_)..
column name : Sales_
i read the column names from hive tables and pass it to source table via sqoop.. in that case, Sales_ column is not present in the source, so im getting an error saying Sales_ invalid column at the source side ,even though i create a column with back ticks in hive.
05-01-2017 11:31 AM
I tried the below queries and it shows the column as created (Sales$). Not sure it is due to your version
create table mydb.test1 (`Sales$` float) describe formatted mydb.test1 describe mydb.test1