You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by anil gupta <an...@gmail.com> on 2013/04/24 19:48:08 UTC

Export BLOB from Oracle via Sqoop

Hi All,

I am using Sqoop 1.4.2 with cdh4.2.0 Enterprise. I am trying to use sqoop
to export the data from a Oracle table that contains blob. But, when i am
exporting that table through sqoop, BLOB column is not being exported. Can
anyone tell me whether Sqoop supports exporting Oracle Blob's? If not, is
there a way that i can write my own custom java code(mapper?) to export
Blob and use it with sqoop.

-- 
Thanks & Regards,
Anil Gupta

Re: Export BLOB from Oracle via Sqoop

Posted by anil gupta <an...@gmail.com>.
Additional Info: The blob does not contains objects larger than 16MB.


On Wed, Apr 24, 2013 at 7:33 PM, anil gupta <an...@gmail.com> wrote:

> Hi Jarcec,
>
> Thanks for your reply. Suppose if table "abc" has a blob column in it.
> I ran the following query with sqoop for exporting data but the column is
> not getting exported:
> sqoop import --connect jdbc:oracle:thin:@db:1521:sid --username user
> --password pass --query 'select * from abc where  $CONDITIONS' --split-by
> id --target-dir /tmp/data --as-textfile --fields-terminated-by \\001
> --escaped-by \\ --null-string '' --null-non-string '' --verbose
>
> Am i missing something in the above command?
>
> Thanks,
> Anil Gupta
>
>
>
>
> On Wed, Apr 24, 2013 at 3:17 PM, Jarek Jarcec Cecho <ja...@apache.org>wrote:
>
>> Hi Anil,
>> the BLOB columns are handled in special way, please take a look into our
>> user guide [1].
>>
>> Jarcec
>>
>> Links:
>> 1: http://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_large_objects
>>
>> On Wed, Apr 24, 2013 at 10:48:08AM -0700, anil gupta wrote:
>> > Hi All,
>> >
>> > I am using Sqoop 1.4.2 with cdh4.2.0 Enterprise. I am trying to use
>> sqoop
>> > to export the data from a Oracle table that contains blob. But, when i
>> am
>> > exporting that table through sqoop, BLOB column is not being exported.
>> Can
>> > anyone tell me whether Sqoop supports exporting Oracle Blob's? If not,
>> is
>> > there a way that i can write my own custom java code(mapper?) to export
>> > Blob and use it with sqoop.
>> >
>> > --
>> > Thanks & Regards,
>> > Anil Gupta
>>
>
>
>
> --
> Thanks & Regards,
> Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta

Re: Export BLOB from Oracle via Sqoop

Posted by anil gupta <an...@gmail.com>.
Hi Jarcec,

Thanks for your reply. Suppose if table "abc" has a blob column in it.
I ran the following query with sqoop for exporting data but the column is
not getting exported:
sqoop import --connect jdbc:oracle:thin:@db:1521:sid --username user
--password pass --query 'select * from abc where  $CONDITIONS' --split-by
id --target-dir /tmp/data --as-textfile --fields-terminated-by \\001
--escaped-by \\ --null-string '' --null-non-string '' --verbose

Am i missing something in the above command?

Thanks,
Anil Gupta




On Wed, Apr 24, 2013 at 3:17 PM, Jarek Jarcec Cecho <ja...@apache.org>wrote:

> Hi Anil,
> the BLOB columns are handled in special way, please take a look into our
> user guide [1].
>
> Jarcec
>
> Links:
> 1: http://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_large_objects
>
> On Wed, Apr 24, 2013 at 10:48:08AM -0700, anil gupta wrote:
> > Hi All,
> >
> > I am using Sqoop 1.4.2 with cdh4.2.0 Enterprise. I am trying to use sqoop
> > to export the data from a Oracle table that contains blob. But, when i am
> > exporting that table through sqoop, BLOB column is not being exported.
> Can
> > anyone tell me whether Sqoop supports exporting Oracle Blob's? If not, is
> > there a way that i can write my own custom java code(mapper?) to export
> > Blob and use it with sqoop.
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta

Re: Export BLOB from Oracle via Sqoop

Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Hi Anil,
the BLOB columns are handled in special way, please take a look into our user guide [1].

Jarcec

Links:
1: http://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_large_objects

On Wed, Apr 24, 2013 at 10:48:08AM -0700, anil gupta wrote:
> Hi All,
> 
> I am using Sqoop 1.4.2 with cdh4.2.0 Enterprise. I am trying to use sqoop
> to export the data from a Oracle table that contains blob. But, when i am
> exporting that table through sqoop, BLOB column is not being exported. Can
> anyone tell me whether Sqoop supports exporting Oracle Blob's? If not, is
> there a way that i can write my own custom java code(mapper?) to export
> Blob and use it with sqoop.
> 
> -- 
> Thanks & Regards,
> Anil Gupta