Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Complex Oracle query to HDFS or Hive through Sqoop


Copy link to this message
-
Re: Complex Oracle query to HDFS or Hive through Sqoop
"Importing data into Hive is as simple as adding the *--hive-import* option
to your Sqoop command line"

See
https://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_importing_data_into_hivefor
details
On Wed, Jul 24, 2013 at 11:58 PM, Omkar Joshi
<[EMAIL PROTECTED]>wrote:

>  Its quite straightforward. You can refer
> http://sqoop.apache.org/docs/1.4.3/SqoopUserGuide.html#_free_form_query_imports
> ****
>
> ** **
>
> ** **
>
> An example that I had tried(and worked) :****
>
> ** **
>
> sqoop import --connect jdbc:mysql://<db_machine_ip>/<schema_name>
> --username <user_name> --password <password> --query "<sql query here>" -m
> 1 --target-dir <destination_hdfs_directory>****
>
> ** **
>
> The only confusion I have now is that the destination is always an HDFS
> path – how to import this data into an EXISTING Hive table ?****
>
> ** **
>
> Regards,****
>
> Omkar Joshi****
>
> ** **
>
> ** **
>
> *From:* Raj Hadoop [mailto:[EMAIL PROTECTED]]
> *Sent:* Thursday, July 25, 2013 6:13 AM
> *To:* [EMAIL PROTECTED]
> *Subject:* Complex Oracle query to HDFS or Hive through Sqoop****
>
> ** **
>
> Hello everyone,****
>
> ** **
>
> ** **
>
> I want to load data from an Oracle query to HDFS or Hive through Sqoop.
>   ****
>
> ** **
>
> My query in Oracle is based on something like this -
>
> *   select a.col1,a.col2,bcol3,c.col4,d.col5 from T1 a,T2 b, T3 c, T4 d
> where a.col1=b.col1 and b.col2=c.col2 and c.col3 = d.col3;*
>
>  Is this possible in SQOOP ? Please advise.****
>
> ** **
>
> ** **
>
> Thanks,****
>
> Raj****
>
> ------------------------------
> The contents of this e-mail and any attachment(s) may contain confidential
> or privileged information for the intended recipient(s). Unintended
> recipients are prohibited from taking action on the basis of information in
> this e-mail and using or disseminating the information, and must notify the
> sender and delete it from their system. L&T Infotech will not accept
> responsibility or liability for the accuracy or completeness of, or the
> presence of any virus or disabling code in this e-mail"
>

--
-- JChan
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB