Repository: sqoop
Updated Branches:
  refs/heads/trunk 2ca85527f -> 6c0b32012

SQOOP-3324: Document SQOOP-816: Sqoop add support for external Hive tables

(Fero Szabo via Szabolcs Vasas)


Branch: refs/heads/trunk
Commit: 6c0b3201280f3c7c4c56530909fbb2977e58542e
Parents: 2ca8552
Author: Szabolcs Vasas <>
Authored: Thu May 17 16:12:05 2018 +0200
Committer: Szabolcs Vasas <>
Committed: Thu May 17 16:12:05 2018 +0200

 src/docs/man/hive-args.txt  |  4 ++++
 src/docs/user/hive-args.txt |  2 ++
 src/docs/user/hive.txt      | 15 +++++++++++++++
 3 files changed, 21 insertions(+)
diff --git a/src/docs/man/hive-args.txt b/src/docs/man/hive-args.txt
index 438c1dc..c2115ea 100644
--- a/src/docs/man/hive-args.txt
+++ b/src/docs/man/hive-args.txt
@@ -39,3 +39,7 @@ Hive options
   Override default mapping for SQL types or input field types into Hive types 
for configured columns.
   If specify commas in this argument, use URL encoded keys and values, for 
   use DECIMAL(1%2C1) instead of DECIMAL(1,1), NUMERIC(1%2C%202) instead of 
NUMERIC(1, 2).
+  Used to specify that the Hive table is an external one,
+  needs to be specified along with +\--hive-import+.
\ No newline at end of file
diff --git a/src/docs/user/hive-args.txt b/src/docs/user/hive-args.txt
index 7509564..8af9a1c 100644
--- a/src/docs/user/hive-args.txt
+++ b/src/docs/user/hive-args.txt
@@ -48,5 +48,7 @@ Argument                      Description
 +\--hs2-user+                 The user for creating the JDBC connection to 
HiveServer2. The default is the current OS user.
 +\--hs2-keytab+               The path to the keytab file of the user 
connecting to HiveServer2. If you choose another \
                        HiveServer2 user (with --hs2-user) then --hs2-keytab 
has to be also specified otherwise it can be omitted.
++\--external-table-dir+       Used to specify that the table is external, not 
managed. \
+                              Has to be specified with the +\--hive-import+ 
diff --git a/src/docs/user/hive.txt b/src/docs/user/hive.txt
index f8f7c27..75a389b 100644
--- a/src/docs/user/hive.txt
+++ b/src/docs/user/hive.txt
@@ -111,3 +111,18 @@ with this codec, Sqoop will automatically index the files 
for splitting and
 configuring a new Hive table with the correct InputFormat. This feature
 currently requires that all partitions of a table be compressed with the lzop
+The user can specify the +\--external-table-dir+ option in the sqoop command to
+work with an external Hive table (instead of a managed table, i.e. the default 
+To import data into an external table, one has to specify +\--hive-import+ in 
the command
+line arguments. Table creation is also supported with the use of 
+Importing into an external Hive table:
+$ sqoop import --hive-import --connect $CONN --table $TABLENAME --username 
$USER --password $PASS --external-table-dir /tmp/external_table_example
+Create an external Hive table:
+$ sqoop import --hive-import --create-hive-table --connect $CONN --table 
$TABLENAME --username $USER --password $PASS --external-table-dir 
/tmp/foobar_example --hive-table foobar

Reply via email to