Monday, February 20, 2017

Import Sql Query results into HDFS


We can use SQOOP to Import the results of a sql query from a relational database into HDFS
Let us take the following RDBMS Mysql Table called student.
Here let us only import std_id = 103 Query Results into HDFS using SQOOP IMPORT command.
Let us import row where std_id = 103 using SQOOP IMPORT.

Let us run the above SQOOP Import and see the Execution flow of the SQOOP IMPORT using –query.
Please note that we no need to use –table parameter if we use –query.
if you are using where condition, make sure you end with AND $CONDITIONS in a single qoates ‘ or ” ”
Let us check the output in HDFS.

No comments:

Post a Comment

How To Fix Hive – Partition Table Query Failed When Stored As Parquet

This article is about the bug in Hive filtering option, when the partition table query stored as parquet. Big data developers will help y...