<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111778#M74626</link>
    <description>&lt;P&gt;I was able to import all tables in the following format:&lt;/P&gt;&lt;P&gt;sqoop import -connect jdbc:oracle:thin:@&amp;lt;fdqn&amp;gt;/&amp;lt;server&amp;gt; -username &amp;lt;username&amp;gt; -P -table CUST_NAV -columns "&amp;lt;column names separated by commas" -hive-import -hive-table databasenameinhive.New_CUST_NAV -target-dir 'location in hdfs'&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/235/bpreachuk.html"&gt;@bpreachuk&lt;/A&gt; I understood the workaround in my problem using your suggestion. I'll import all tables as is from the oracle db and create different views which i can then use in my select statements.&lt;/P&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2017 16:02:34 GMT</pubDate>
    <dc:creator>nandini_bhattac</dc:creator>
    <dc:date>2017-02-27T16:02:34Z</dc:date>
    <item>
      <title>I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111774#M74622</link>
      <description>&lt;P&gt;I have 5 tables belonging to different schemas but have common fields. I need to perform a complex join to fetch data for analysis. I want to store the results in HIVE. Can I do this using sqoop?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 19:13:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111774#M74622</guid>
      <dc:creator>nandini_bhattac</dc:creator>
      <dc:date>2017-02-17T19:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111775#M74623</link>
      <description>&lt;P&gt;Have you looked at free-form query option in sqoop? &lt;/P&gt;&lt;P&gt;&lt;A href="https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_free_form_query_imports" target="_blank"&gt;https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_free_form_query_imports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would suggest to save result of a complex query in a database and sqoop that as one dataset.&lt;/P&gt;&lt;P&gt;There is however a note on free-form queries.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH&gt;Note&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;The facility of using free-form query in the current version of Sqoop is limited to simple queries where there are no ambiguous projections and no &lt;CODE&gt;OR&lt;/CODE&gt; conditions in the &lt;CODE&gt;WHERE&lt;/CODE&gt; clause. Use of complex queries such as queries that have sub-queries or joins leading to ambiguous projections can lead to unexpected results.

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:49:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111775#M74623</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-17T20:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111776#M74624</link>
      <description>&lt;P&gt;To add the &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt;'s solution - consider saving your complex query in the source RDBMS as a &lt;STRONG&gt;view&lt;/STRONG&gt;.  Then just call Sqoop specifying the view name instead of a table name.  Makes the code nice and clean.   &lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 21:03:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111776#M74624</guid>
      <dc:creator>bpreachuk</dc:creator>
      <dc:date>2017-02-17T21:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111777#M74625</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt;. Thanks for the reply. I had read on free from query imports but decided against it because we cannot use ANDs and ORs. I will however try and see what happens. I cant work on the second option you and &lt;A rel="user" href="https://community.cloudera.com/users/235/bpreachuk.html" nodeid="235"&gt;@bpreachuk&lt;/A&gt; suggested as i dont have access to create tables/views in the RDBMS. So the way i'll go is try using the free form query. If that doesnt work i'll import the tables as is from the RDBMS and run complex queries using HIVE. I'll update you on how it goes.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 15:58:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111777#M74625</guid>
      <dc:creator>nandini_bhattac</dc:creator>
      <dc:date>2017-02-20T15:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: I have multiple tables which i need to join and fetch results into HIVE. Can I do this using Sqoop?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111778#M74626</link>
      <description>&lt;P&gt;I was able to import all tables in the following format:&lt;/P&gt;&lt;P&gt;sqoop import -connect jdbc:oracle:thin:@&amp;lt;fdqn&amp;gt;/&amp;lt;server&amp;gt; -username &amp;lt;username&amp;gt; -P -table CUST_NAV -columns "&amp;lt;column names separated by commas" -hive-import -hive-table databasenameinhive.New_CUST_NAV -target-dir 'location in hdfs'&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/235/bpreachuk.html"&gt;@bpreachuk&lt;/A&gt; I understood the workaround in my problem using your suggestion. I'll import all tables as is from the oracle db and create different views which i can then use in my select statements.&lt;/P&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 16:02:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-have-multiple-tables-which-i-need-to-join-and-fetch/m-p/111778#M74626</guid>
      <dc:creator>nandini_bhattac</dc:creator>
      <dc:date>2017-02-27T16:02:34Z</dc:date>
    </item>
  </channel>
</rss>

