hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhijeet gaikwad <abygaikwa...@gmail.com>
Subject Re: How to use sqoop import
Date Fri, 01 Mar 2013 14:18:17 GMT
Also required: --query or --table .
If your table has a primary key, --split-by is optional.

Detailed:
Have a look at sqoop documentation here <http://sqoop.apache.org/docs/>.
v1.4.2 user guide: http://sqoop.apache.org/docs/1.4.2/SqoopUserGuide.html

Thanks,
Abhijeet

On Fri, Mar 1, 2013 at 6:36 PM, vasanth kumar <rj.vasanthkumar@gmail.com>wrote:

> Try this
> ./sqoop import --connect jdbc:mysql://localhost/my --username user
> --password 1234 --query 'select * from table where id=5 AND $CONDITIONS'
> --split-by table.id --target-dir /dir
>
> you must specify --split-by and --target-dir
>
>
>
>
> On Fri, Mar 1, 2013 at 12:32 PM, samir das mohapatra <
> samir.helpdoc@gmail.com> wrote:
>
>> Hi All,
>>   Can any one share some example how to run sqoop "Import results of SQL
>> 'statement'"   ?
>>  for example:
>>          sqoop import -connect jdbc:.........  --driver xxxxxxxxxxx
>>
>> after this if i am specifying  --query "select statement " it is even not
>> recognizing as sqoop  valid statement..
>>
>> Regards,
>> samir.
>>
>>
>
>
>
> --
> Regards
> Vasanth kumar RJ
>

Mime
View raw message