[ https://issues.apache.org/jira/browse/SQOOP-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133501#comment-14133501 ]
Richard commented on SQOOP-1393: -------------------------------- The query option works fine for hive 0.13.0. The only problem is that the table name in hive is "null". which is a bug and has already create a JIRA (SQOOP-1520) for it. Thanks for your testing. {code} sh sqoop import --connect jdbc:mysql://server-391/test --username admin --password admin --target-dir /user/pkhadloya/sqoop/extusersegments --hive-import --hive-table extusersegments --create-hive-table --as-parquetfile --query "select * from test where \$CONDITIONS" --split-by id {code} {code:title=hive} 0: jdbc:hive2://server-393:10000/default> show tables; +-----------+--+ | tab_name | +-----------+--+ | null | +-----------+--+ 1 row selected (0.041 seconds) 0: jdbc:hive2://server-393:10000/default> select * from null; +----------+------------+--+ | null.id | null.name | +----------+------------+--+ | 1 | richard | +----------+------------+--+ 1 row selected (2.062 seconds) {code} > Import data from database to Hive as Parquet files > -------------------------------------------------- > > Key: SQOOP-1393 > URL: https://issues.apache.org/jira/browse/SQOOP-1393 > Project: Sqoop > Issue Type: Sub-task > Components: tools > Reporter: Qian Xu > Assignee: Richard > Fix For: 1.4.6 > > Attachments: patch.diff, patch_v2.diff, patch_v3.diff > > > Import data to Hive as Parquet file can be separated into two steps: > 1. Import an individual table from an RDBMS to HDFS as a set of Parquet files. > 2. Import the data into Hive by generating and executing a CREATE TABLE > statement to define the data's layout in Hive with Parquet format table -- This message was sent by Atlassian JIRA (v6.3.4#6332)