sowmya created SQOOP-3457:
-----------------------------

             Summary: SQOOP import of "IMAGE" data type failure
                 Key: SQOOP-3457
                 URL: https://issues.apache.org/jira/browse/SQOOP-3457
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-build
            Reporter: sowmya


i  am trying to import a table from MSSQL which has few columns with data type 
"Image"

The value in the columns are of hexadecimal format

Ex

database type : MSSQL

column name : column_test

Data_type : image

value of the column:

( 
0x1F8B0800000400EDBD07601C499625262FD7E0CC188CDE692EC1D69472329AB2A81CA6501320CCE74A10880604010ED9D....)

 

*When I import using sqoop the COLUMNS is automatically taken as string in hive 
but the data is corrupted though the import was success*

 

*When i try converting to binary as well the data of the column is corrupted 
though the import is success.*

+*COMMAND USED :*+

 sqoop import --driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver' --connect 
'jdbc:sqlserver://IP:PORT;database=DB;' --connection-manager 
'org.apache.sqoop.manager.SQLServerManager' --username <> -password <> 
--as-parquetfile --delete-target-dir --target-dir '/user/test/' --query "select 
GUID,Name,cast(column_testAS binary) AS Settings FROM my_table_name where 
\$CONDITIONS; " --m 1

+*in hive:*+

Select test_column from table_name; 

fetched me junk data

 

+_*IS IMAGE data type is not supported in hive yet ?*_+

+_*is there a way to import the exact hexadecimal value (*_+
+_*0x1F8B0800000400EDBD07601C499625262FD7E0CC188CDE692EC1D69472329AB2A81CA6501320CCE74A10880604010ED9D)
 in string format in hive ?*_+



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to