5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 03:11:00 +08:00
sqoop/testdata/hive/scripts/numericImport.q
Andrew Bayer e3638e8ce0 SQOOP-37. Escape table and column names for Hive.
Hive allows the use of keywords as column and table names as long as they are
escaped using back-ticks. This change makes Sqoop always escape table and
column names using back-ticks thereby allowing Sqoop to work with Hive tables
that use keywords for either the table name or column names.

(Lars Francke via arvind)

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149989 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:20 +00:00

3 lines
290 B
Plaintext

CREATE TABLE IF NOT EXISTS `NUMERIC_HIVE_IMPORT` ( `DATA_COL0` DOUBLE, `DATA_COL1` STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' LINES TERMINATED BY '\012' STORED AS TEXTFILE;
LOAD DATA INPATH 'file:BASEPATH/sqoop/warehouse/NUMERIC_HIVE_IMPORT' INTO TABLE `NUMERIC_HIVE_IMPORT`;