Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop/Hive : Loading data from .csv on a remote machine

I am having a csv file that can from a http url. Is there any way I can load it from there :-

This is what I am trying

LOAD DATA INPATH 'http://192.168.56.101:8081/TeamHalf.csv' OVERWRITE INTO TABLE csvdata;
like image 290
vineetv2821993 Avatar asked Jan 31 '26 17:01

vineetv2821993


1 Answers

Hive Load command is a follows :

LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]

1) if LOCAL specified - Loads from local FS filepath

2) if no LOCAL - Loads from HDFS filepath only i.e,: filepath must refer to files within the same filesystem as the table's (or partition's) location

So Load from remote http:path won't work. refer HIVE DML . The possible way is (Staging) to load the data from remote http:path to LocalFS or HDFS , then to Hive Warehouse.

like image 107
vijay kumar Avatar answered Feb 03 '26 08:02

vijay kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!