Reply
Highlighted
New Contributor
Posts: 5
Registered: ‎07-21-2018

loading parquet data in mysql table from hdfs using SQOOP

 

I am trying to insert to insert parquet data from HDFS to MySQL table named categories.

Command for importing a parquet file in HDFS:

sqoop import \
--connect jdbc:mysql://localhost:3306/retail_db \
--username root \
--password cloudera \
--table categories \
-m 1 \
--warehouse-dir /BhaiBhaiBhai1 \
--as-parquetfile   

Command for exporting parquet data in MySQL from HDFS:

sqoop export \
--connect jdbc:mysql://localhost:3306/retail_db \
--username root \
--password cloudera \
--export-dir /BhaiBhaiBhai1/categories \
--table categories \
-m 1  

and i get below error :

Error: parquet.io.ParquetDecodingException: Can not read value at 1 in block 0 in file hdfs://quickstart.cloudera:8020

Below is my schema:
Schema Link

Below is my sample data:
SAMPLE DATA LINK

So how do i resolve my problem. Anyone ???

Announcements