| Forum Home > Bigdata Learnings( Hadoop, HBase,Hive and other bigdata technologies) > Hive: Import and Export data from HDFS and Local Directory | ||
|---|---|---|
|
Site Owner Posts: 83 |
Import Data from Local Directory: hive>LOAD DATA LOCAL INPATH '/local/path' OVERWRITE INTO TABLE table-name; OVERWRITE is optional in latest versions of hive . You can exclude it if you want to append data in table. Export Data to Local Directory: hive>INSERT OVERWRITE LOCAL DIRECTORY '/local dir/path' SELECT * from table-name; Import Data from HDFS : hive>LOAD DATA INPATH '/hdfs/path/to/file' OVERWRITE INTO TABLE tablename; OVERWRITE is optional in latest versions of hive . You can exclude it if you want to append data in table. Export Data to HDFS: hive>INSERT OVERWRITE DIRECTORY /path/to/hdfs' SELECT * FROM tablename;
| |
| ||
|
Member Posts: 1 |
hello sourav- I used this query but the problem here is we are getting number of files along with CRC file. hive>INSERT OVERWRITE LOCAL DIRECTORY '/local dir/path' SELECT * from table-name; How can I create one file from Hive with incremental extraction. | |
| ||
|
Member Posts: 1 |
How user interface will connected to Hadoop.I am using play framework user interface to connect HDFS.Plz explain java code doing this work simpler | |
| ||
|
Site Owner Posts: 83 |
Hi Vinay, I apologize for very late reply. I lost touch with this website Please use Hive Client for running Hive Queries from Java. Please refer following URL: https://cwiki.apache.org/confluence/display/Hive/HiveClient | |
--
| ||
|
Site Owner Posts: 83 |
Hi Siegfried, I apologize for very late reply. I lost touch with this website If you are facing some issue, please post your query , I will surely reply | |
--
| ||