<?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: Sqoop Import - Now what in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151990#M114467</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12496/nichopper.html" nodeid="12496"&gt;@Nic Hopper&lt;/A&gt;  You can directly import table to hive, with --hive-import&lt;/P&gt;&lt;PRE&gt;sqoop import --connect "jdbc:sqlserver://ipaddress:port;database=dbname;user=username;password=userpassword" --table policy --warehouse-dir "/user/maria_dev/data/SQLImport" --hive-import --hive-overwrite
&lt;/PRE&gt;&lt;P&gt;It creates the hive table and writes data into it(generally managed table finally moves data to hive.warehouse.dir)&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2017 17:54:01 GMT</pubDate>
    <dc:creator>dchiguruvad</dc:creator>
    <dc:date>2017-02-01T17:54:01Z</dc:date>
    <item>
      <title>Sqoop Import - Now what</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151987#M114464</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I wondered if someone could point me in the right direction.&lt;/P&gt;&lt;P&gt;I've imported some data (4 rows) into HDFS via Sqoop using the command below; &lt;/P&gt;&lt;PRE&gt;sqoop import --connect "jdbc:sqlserver://ipaddress:port;database=dbname;user=username;password=userpassword" --table policy --target-dir "/user/maria_dev/data/SQLImport"&lt;/PRE&gt;&lt;P&gt;This worked correctly and gave me 5 files; &lt;/P&gt;&lt;P&gt;part-m-00000,&lt;/P&gt;&lt;P&gt;part-m-00001,&lt;/P&gt;&lt;P&gt;part-m-00002,&lt;/P&gt;&lt;P&gt;part-m-00003 &lt;/P&gt;&lt;P&gt;and _Success &lt;/P&gt;&lt;P&gt;Given there are 4 rows in my table and 4 part files I assume each is a row plus the success file. &lt;/P&gt;&lt;P&gt;Where I need some help is with; &lt;/P&gt;&lt;P&gt;1. Understanding what these are? Are they AVRO files? &lt;/P&gt;&lt;P&gt;2. How can I create a Hive 'table' over the top of these, like I would by using the upload button in Ambari? &lt;/P&gt;&lt;P&gt;Making accessible to Hive Querying?
Any help or pointers would be massively appreciated. &lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 22:30:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151987#M114464</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2017-01-30T22:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop Import - Now what</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151988#M114465</link>
      <description>&lt;P&gt;Please check the following, these could give you some pointers:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/content/supportkb/48949/how-can-i-use-sqoop-to-import-and-create-tables-wi.html" target="_blank"&gt;https://community.hortonworks.com/content/supportkb/48949/how-can-i-use-sqoop-to-import-and-create-tables-wi.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/17469/creating-hive-partitioned-tables-using-sqoop.html" target="_blank"&gt;https://community.hortonworks.com/articles/17469/creating-hive-partitioned-tables-using-sqoop.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 22:44:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151988#M114465</guid>
      <dc:creator>icocio</dc:creator>
      <dc:date>2017-01-30T22:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop Import - Now what</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151989#M114466</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12496/nichopper.html" nodeid="12496"&gt;@Nic Hopper&lt;/A&gt;&lt;/P&gt;&lt;P&gt;like &lt;A rel="user" href="https://community.cloudera.com/users/493/icocio.html" nodeid="493"&gt;@icocio&lt;/A&gt; points out you can simply use sqoop to fetch the data and write to a Hive table directly.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 01:24:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151989#M114466</guid>
      <dc:creator>pmohan</dc:creator>
      <dc:date>2017-01-31T01:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop Import - Now what</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151990#M114467</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12496/nichopper.html" nodeid="12496"&gt;@Nic Hopper&lt;/A&gt;  You can directly import table to hive, with --hive-import&lt;/P&gt;&lt;PRE&gt;sqoop import --connect "jdbc:sqlserver://ipaddress:port;database=dbname;user=username;password=userpassword" --table policy --warehouse-dir "/user/maria_dev/data/SQLImport" --hive-import --hive-overwrite
&lt;/PRE&gt;&lt;P&gt;It creates the hive table and writes data into it(generally managed table finally moves data to hive.warehouse.dir)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 17:54:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151990#M114467</guid>
      <dc:creator>dchiguruvad</dc:creator>
      <dc:date>2017-02-01T17:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop Import - Now what</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151991#M114468</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you all for the responses. Works as expected. I do have another question though, more advice than anything.&lt;/P&gt;&lt;P&gt;So I can now import data from SQL Server to Hive but if I want to apply business logic to my data how do you think I'm best doing this. Only something simple for now I think.&lt;/P&gt;&lt;P&gt;Shall I do it;&lt;/P&gt;&lt;P&gt;1. In the import, so query the data rather than a table in my import and have some logic there.&lt;/P&gt;&lt;P&gt;2. Import it to HIVE as I have done and then do something there.&lt;/P&gt;&lt;P&gt;3. Do something else.&lt;/P&gt;&lt;P&gt;Any pointers would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nic.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 22:01:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-Import-Now-what/m-p/151991#M114468</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2017-02-01T22:01:19Z</dc:date>
    </item>
  </channel>
</rss>

