You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Sandish Kumar HN (JIRA)" <ji...@apache.org> on 2017/08/10 17:02:00 UTC

[jira] [Assigned] (SQOOP-3132) sqoop export from Hive table stored in Parquet format to Oracle CLOB column results in (null)

     [ https://issues.apache.org/jira/browse/SQOOP-3132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandish Kumar HN reassigned SQOOP-3132:
---------------------------------------

    Assignee: Sandish Kumar HN

> sqoop export from Hive table stored in Parquet format to Oracle CLOB column results in (null)
> ---------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-3132
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3132
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/oracle, hive-integration
>    Affects Versions: 1.4.6
>         Environment: sandbox
>            Reporter: Ramprasad
>            Assignee: Sandish Kumar HN
>            Priority: Critical
>              Labels: beginner
>
> I am trying to export a String column from Hive table (stored in Parquet format) to Oracle CLOB data type column using sqoop export. Below are the commands I run for creation of tables in Oracle & Hive and, the sqoop command I use to to export the data.
> Table creation & insert into Hive: 
> create table default.sqoop_oracle_clob_test (sample_id int, verylargestring String) stored as PARQUET; 
> [SUCCESS] 
> insert into default.sqoop_oracle_clob_test (sample_id, verylargestring) values (123, "Really a very large String"); 
> insert into default.sqoop_oracle_clob_test (sample_id, verylargestring) values (456, "Another very large String"); 
> [SUCCESS]
> Table creation in Oracle 
> create table sqoop_exported_oracle (sample_id NUMBER, verylargestring CLOB); 
> [success] 
> Sqoop export command:
> sqoop \
> export \
> --connect jdbc:oracle:thin:@//host:port/database_name \
> --username ****** \
> --password ****** \
> --table sqoop_exported_oracle \
> --columns SAMPLE_ID,VERYLARGESTRING \
> --map-column-java "VERYLARGESTRING=String" \
> --hcatalog-table "sqoop_oracle_clob_test" \
> --hcatalog-database "default"
> sqoop job executes fine without any error messages and displays the message Exported 2 records.
> The result in Oracle table is as below,
> select * from sqoop_exported_oracle;
> sample_id | verylargestring
> 123 | (null)
> 456 | (null) 
> I tried using --staging-table as well but, resulted in same. I suspect this is a bug while exporting to oracle CLOB columns when retrieving from Hive which is stored in parquet format.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)