Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Mismatch Input Error
Labels:
- Labels:
-
Apache Hive
Explorer
Created ‎01-27-2018 11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Community,
I have created the following Hive script, however, I keep on getting the error message:
FAILED: ParseException line 3:10 mismatched input 'INTO' expecting INPATH near 'DATA' in load statement 18/01/27 11:49:50 [main]: ERROR ql.Driver: FAILED: ParseException line 3:10 mismatched input 'INTO' expecting INPATH near 'DATA' in load statement org.apache.hadoop.hive.ql.parse.ParseException: line 3:10 mismatched input 'INTO' expecting INPATH near 'DATA' in load statement
Can someone please let me know where I'm going wrong.
set hive.exec.dynamic.partition.mode=nonstrict; DROP TABLE IF EXISTS datafactory7; CREATE EXTERNAL TABLE datafactory7 ( anonid INT, eprofileclass INT, fueltypes STRING, acorn_category INT, acorn_group STRING, acorn_type INT, nuts4 STRING, lacode STRING, nuts1 STRING, gspgroup STRING, ldz STRING, gas_elec STRING, gas_tout STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE TBLPROPERTIES ("skip.header.line.count" = "1"); LOAD DATA INTO '${hiveconf:inputtable}' select * from datafactory7 limit 14 STORED AS TEXTFILE LOCATION '${hiveconf:partitionedtable}';
Thanks
Carlton
1 REPLY 1
Contributor
Created ‎01-28-2018 03:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at this guide:
You should either try
INSERT INTO TABLE '${hiveconf:inputtable}' SELECT * FROM datafactory7 limit 14;
or
LOAD DATA INPATH '<HDFS PATH WHERE FILES LOCATED>' INTO TABLE ${hiveconf:inputtable};
