Skip to Content
Apache Sqoop Cookbook
book

Apache Sqoop Cookbook

by Kathleen Ting, Jarek Jarcec Cecho
July 2013
Intermediate to advanced content levelIntermediate to advanced
94 pages
1h 52m
English
O'Reilly Media, Inc.
Content preview from Apache Sqoop Cookbook

Chapter 2. Importing Data

The next few chapters, starting with this one, are devoted to transferring data from your relational database or warehouse system to the Hadoop ecosystem. In this chapter we will cover the basic use cases of Sqoop, describing various situations where you have data in a single table in a database system (e.g., MySQL or Oracle) that you want to transfer into the Hadoop ecosystem.

We will be describing various Sqoop features through examples that you can copy and paste to the console and then run. In order to do so, you will need to first set up your relational database. For the purpose of this book, we will use a MySQL database with the account sqoop and password sqoop. We will be connecting to a database named sqoop. You can easily create the credentials using the script mysql.credentials.sql uploaded to the GitHub project associated with this book.

You can always change the examples if you want to use different credentials or connect to a different relational system (e.g., Oracle, PostgreSQL, Microsoft SQL Server, or any others). Further details will be provided later in the book. As Sqoop is focused primarily on transferring data, we need to have some data already available in the database before running the Sqoop commands. To have something to start with, we’ve created the table cities containing a few cities from around the world (see Table 2-1). You can use the script mysql.tables.sql from the aforementioned GitHub project to create and populate all tables ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Apache Sqoop

Mastering Apache Sqoop

David Yahalom
Apache Hive Cookbook

Apache Hive Cookbook

Hanish Bansal, Saurabh Chauhan, Shrey Mehrotra
Apache Spark Quick Start Guide

Apache Spark Quick Start Guide

Shrey Mehrotra, Akash Grade

Publisher Resources

ISBN: 9781449364618Errata PageSupplemental Content