Monday 3 September 2018

If we import data from MySql to HDFS using Sqoop, what would be the file format stored in HDFS?

If we are importing a data from MySql to HDFS by using Sqoop, what would be the file format which has stored in HDFS


Sqoop has imported your data as comma-separated text files. It supports a number of other file formats, which can be activated with the arguments listed below
mSqoop arguments that control the file formats of import commands Argument
--as-avrodatafile    Data is imported as Avro files.

--as-sequencefile    Data is imported as Sequence Files.

--as-textfile       The default file format, with imported data as CSV text files.

example: you should pass like below.

 sqoop import  mysql:--/--/db   --as-avrodatafile

0 comments:

Post a Comment