sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject sqoop git commit: SQOOP-3324: Document SQOOP-816: Sqoop add support for external Hive tables
Date Thu, 17 May 2018 14:13:11 GMT
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)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/6c0b3201
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/6c0b3201
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/6c0b3201

Branch: refs/heads/trunk
Commit: 6c0b3201280f3c7c4c56530909fbb2977e58542e
Parents: 2ca8552
Author: Szabolcs Vasas <vasas@apache.org>
Authored: Thu May 17 16:12:05 2018 +0200
Committer: Szabolcs Vasas <vasas@apache.org>
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(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/6c0b3201/src/docs/man/hive-args.txt
----------------------------------------------------------------------
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 example,
   use DECIMAL(1%2C1) instead of DECIMAL(1,1), NUMERIC(1%2C%202) instead of NUMERIC(1, 2).
+
+--external-table-dir::
+  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

http://git-wip-us.apache.org/repos/asf/sqoop/blob/6c0b3201/src/docs/user/hive-args.txt
----------------------------------------------------------------------
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+ option.
 --------------------------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/6c0b3201/src/docs/user/hive.txt
----------------------------------------------------------------------
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
 codec.
+
+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 behavior).
+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 +\--create-hive-table+.
+
+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
+----


Mime
View raw message