mirror of
https://github.com/apache/sqoop.git
synced 2025-05-02 22:31:35 +08:00
SQOOP-2642: Document ability to specify commas in --map-column-hive option
(Ze Jin via Jarek Jarcec Cecho)
This commit is contained in:
parent
de2fa9a686
commit
c9c3f6a3a2
@ -36,4 +36,6 @@ Hive options
|
||||
When used with --hive-import, overrides the destination table name
|
||||
|
||||
--map-column-hive (mapping)::
|
||||
Override default mapping for SQL types or input field types into Hive types for configured columns
|
||||
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).
|
||||
|
@ -32,14 +32,16 @@ Argument Description
|
||||
+\--hive-table <table-name>+ Sets the table name to use when importing\
|
||||
to Hive.
|
||||
+\--hive-drop-import-delims+ Drops '\n', '\r', and '\01' from string\
|
||||
fields when importing to Hive.
|
||||
fields when importing to Hive.
|
||||
+\--hive-delims-replacement+ Replace '\n', '\r', and '\01' from string\
|
||||
fields with user defined string when importing to Hive.
|
||||
+\--hive-partition-key+ Name of a hive field to partition are \
|
||||
sharded on
|
||||
fields with user defined string when importing to Hive.
|
||||
+\--hive-partition-key+ Name of a hive field to partition are \
|
||||
sharded on
|
||||
+\--hive-partition-value <v>+ String-value that serves as partition key\
|
||||
for this imported into hive in this job.
|
||||
for this imported into hive in this job.
|
||||
+\--map-column-hive <map>+ Override default mapping from SQL type to\
|
||||
Hive type for configured columns.
|
||||
Hive type for configured columns. If specify commas in\
|
||||
this argument, use URL encoded keys and values, for example,\
|
||||
use DECIMAL(1%2C%201) instead of DECIMAL(1, 1).
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
@ -328,6 +328,9 @@ Sqoop is expecting comma separated list of mapping in form <name of column>=<new
|
||||
$ sqoop import ... --map-column-java id=String,value=Integer
|
||||
----
|
||||
|
||||
Notice that specifying commas in --map-column-hive option, you should use URL encoded
|
||||
keys and values, for example, use DECIMAL(1%2C%201) instead of DECIMAL(1, 1).
|
||||
|
||||
Sqoop will rise exception in case that some configured mapping will not be used.
|
||||
|
||||
Schema name handling
|
||||
|
Loading…
Reference in New Issue
Block a user