Skip to content

Commit

Permalink
Updated Sqoop exercise with additional command-line arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kimball committed Oct 17, 2009
1 parent 4675a69 commit 5c00d56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/exercises/SqoopExercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,14 @@ <h2>Importing a Table</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
$ sqoop --connect jdbc:mysql://localhost/training --username training --table bible_freq \
--hive-import
--hive-import --direct --fields-terminated-by '\t' --lines-terminated-by '\n'
</pre>
</div></div>

<p>This instructs Sqoop to import the table into HDFS, and then use Hive to create a table
with the same name in its metastore, and load in the newly-imported data.</p>
with the same name in its metastore, and load in the newly-imported data. Sqoop
will use a MySQL-specific "direct" import mode which is designed to read from MySQL
efficiently. Finally, we specify the delimiters to use between fields and records.</p>

<p>You can verify that this operation worked two ways. First, we can use <tt>hadoop</tt>
to verify that the files have been loaded into Hive's warehouse directory:</p>
Expand Down

0 comments on commit 5c00d56

Please sign in to comment.