Saturday, 1 August 2020

Export data to local file from Hive

// Export data to local file from Hive
set hive.cli.print.header=true;

INSERT OVERWRITE LOCAL DIRECTORY '/home/cloudera/Documents/output'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
SELECT * FROM ohm.sample_1;

// Display the content
cat /home/cloudera/Documents/output/*
18282782 NW
1929SEGH2 BSTN
172u8562 PLA
121232 JHK
3443453 AG

Flume - Simple Demo

// create a folder in hdfs : $ hdfs dfs -mkdir /user/flumeExa // Create a shell script which generates : Hadoop in real world <n>...