Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Microsoft SQL Server 2012 with Hadoop

You're reading from  Microsoft SQL Server 2012 with Hadoop

Product type Book
Published in Aug 2013
Publisher Packt
ISBN-13 9781782177982
Pages 96 pages
Edition 1st Edition
Languages
Author (1):
Debarchan Sarkar Debarchan Sarkar
Profile icon Debarchan Sarkar

Table of Contents (12) Chapters

The Sqoop export tool


As stated earlier, Sqoop is a bi-directional connector. Sqoop's export process will read a set of delimited text files from HDFS in parallel, parse them into records, and insert them as new rows in a target database table. The following examples export data from HDFS and Hive to SQL Server. The assumption is that you are running the commands from the $SQOOP_HOME directory on the master node of the Hadoop cluster, where Sqoop is installed.

When using the sqoop export command, you must specify the following mandatory arguments:

  • --connect argument specifying the connection string to the SQL Server database

  • --username and --password arguments to provide valid credentials to connect to the SQL Server database

  • --table or --call argument to export to an SQL table or invoke a stored procedure call

  • --export-dir argument to specify the HDFS directory to export

The following command exports data back from a delimited text file in /data/ErrorLogs on HDFS to ErrorLog table in Adventureworks2012...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}