[ 
https://issues.apache.org/jira/browse/SQOOP-3287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366702#comment-16366702
 ] 

Szabolcs Vasas commented on SQOOP-3287:
---------------------------------------

Hi [~ashishprem],

The problem could be that the --as-parquetfile is among the extra options after 
the --.

Try to to put before – --schema like this:

sqoop import \
--connect 
"jdbc:jtds:sqlserver://<<Server2>>;useNTLMv2=true;domain=XXXX;databaseName=<<DB_name>>"
 \
--connection-manager org.apache.sqoop.manager.SQLServerManager --driver 
net.sourceforge.jtds.jdbc.Driver \
--username xxxx \
--password xxxx \
--table table2 \
--target-dir /user/user1/02/ \ 

--as-parquetfile \

-- --schema=s1 \

> Import to HDFS not working in parquet not working for LDAP SQL Server
> ---------------------------------------------------------------------
>
>                 Key: SQOOP-3287
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3287
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/sqlserver, sqoop2-jdbc-connector
>    Affects Versions: 1.4.6
>            Reporter: Ashish Kumar Sinha
>            Priority: Minor
>              Labels: LDAP, Parquet, sqlserver
>
> I am importing data from SQL Server to HDFS. Seems there is a bug when 
> autnetication mode is LDAP and format is parquet. Please let me know if this 
> is a bug or I am doing incorrectly. I am using Cloudera distribution.
> Below different scenarios I have tested
> Command Used are.
> 1) SQL Server (Native Connection) -> HDFS Text Format *(WORKS FINE)*
> sqoop import \
> --connect "jdbc:sqlserver://<<ServerName>>;databasename=<<DB_Name>>" 
> --username xxxx \
> --password xxxx \
> --table 'table1' \
> --split-by col1 \
> --target-dir /user/user1/01/
> 2) SQL Server (Native Connection) -> HDFS Parquet Format *(WORKS FINE)*
> sqoop import \
> --connect "jdbc:sqlserver://<<ServerName>>;databasename=<<DB_Name>>" 
> --username xxxx \
> --password xxxx \
> --table 'table1' \
> --split-by col1 \
> --target-dir /user/user1/01/ \
> --as-parquetfile
>  
> 3) SQL Server (LDAP Connection) -> HDFS Text format (*WORKS FINE*)
> sqoop import \
> --connect 
> "jdbc:jtds:sqlserver://<<Server2>>;useNTLMv2=true;domain=XXXX;databaseName=<<DB_name>>"
>  \
> --connection-manager org.apache.sqoop.manager.SQLServerManager --driver 
> net.sourceforge.jtds.jdbc.Driver \
> --username xxxx \
> --password xxxx \
> --table table2 \
> --target-dir /user/user1/02/ \ 
> -- --schema=s1
> 4) SQL Server (LDAP Connection) -> HDFS Parquet format (*Executes 
> successfully, but the exported files are not parquet, they are in TEXT 
> format*)
> sqoop import \
> --connect 
> "jdbc:jtds:sqlserver://<<Server2>>;useNTLMv2=true;domain=XXXX;databaseName=<<DB_name>>"
>  \
> --connection-manager org.apache.sqoop.manager.SQLServerManager --driver 
> net.sourceforge.jtds.jdbc.Driver \
> --username xxxx \
> --password xxxx \
> --table table2 \
> --target-dir /user/user1/02/ \ 
> -- --schema=s1 \
> --as-parquetfile



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to