- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Problem inserting data into hive table using jdbc
- Labels:
-
Apache Hadoop
-
Apache Hive
Created ‎06-18-2022 09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a problems inserting data in a hive table, i'm using Amazon JDBC (AmazonHiveJDBC-2.6.19.1022), I test with Cloudera JDBS too.
create table sf1 (c1 string, c2 string, c3 string, c4 string, c5 string, c6 string, c7 string);
Then i try to insert into that table (using any GUI, ex. DBvisualizer) data as follows
insert into sf1 (c1,c2,c3,c4,c5,c6,c7) values ('1','2','3','4','5','6','7')
but i get:
ERROR: Code:40000, Sql State: 42000 error while compiling statement: FAILED: SemanticException 0:0 Expected 7 columns for insclause-0/default@sf1; select produces 1 columns. Error encountered near token "7"
[Code 40000, SQL State: 42000][...Expected 7 columns ...; select produces 1 columns. Error encounterednear token "7"]
I have no problem inserting with the same clause using hive command line.
Created ‎06-23-2022 08:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Lobitojc ,
It seems to be a Hive BUG please refer the below Jira:
https://issues.apache.org/jira/browse/HIVE-24998
Regards,
Chethan YM
