Importing CSV file into Hadoop

akaliza picture akaliza · Dec 14, 2015 · Viewed 24.4k times · Source

I am new with Hadoop, I have a file to import into hadoop via command line (I access the machine through SSH)

How can I import the file in hadoop? How can I check afterward (command)?

Answer

Sam picture Sam · Jul 7, 2016

2 steps to import csv file

  1. move csv file to hadoop sanbox (/home/username) using winscp or cyberduck.
  2. use -put command to move file from local location to hdfs.

        hdfs dfs -put /home/username/file.csv /user/data/file.csv