Exporting data from HDFS to a relational database using Apache Sqoop

In this recipe, we'll be using Sqoop2 or Sqoop 1.4.x to export data from HDFS to a PostgreSQL database.

Getting ready

A working Hadoop2 cluster with a Sqoop2 or Sqoop 1.4.x installation is required for this recipe.

We will be using a PostgreSQL database. You can also use another RDBMS for this purpose as well, but the following recipe steps will have to be changed accordingly.

Follow the previous recipe, Importing data to HDFS from a relational database using Apache Sqoop.

How to do it...

This section demonstrates how to export data from HDFS to a PostgreSQL database using SQOOP. Proceed with the following steps:

  1. Follow the step 1 of the previous Importing data to HDFS from a relational ...

Get Hadoop MapReduce v2 Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.