<?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: import the views of a sql server database in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156679#M28905</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;i don't think sqoop has any different way to import views, it should work same as for tables. Can you please let us know what issue you are facing i.e any error messages? You can also use free form queries to import the view data.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2016 17:13:08 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-05-19T17:13:08Z</dc:date>
    <item>
      <title>import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156677#M28903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;DIV&gt;I have a problem with importing views of a sql server database. &lt;/DIV&gt;&lt;DIV&gt;To import the tables i do:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;for table in $@&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;sqoop import  \
--connect "jdbc:jtds:sqlserver://xxxxxxxxx:xxxxxx;databaseName=xxxxxx;user=xxxxxx;password=xxxxxxxx;instance=xxxxxx" \
--driver net.sourceforge.jtds.jdbc.Driver \
--username xxxx \
--table $table \
--hive-import \
--hive-table xxxxxxxxx.$table -m 1 &lt;/P&gt;&lt;P&gt;done&lt;/P&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;P&gt;If
I want to import the views how should I change my script please&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;Thank !&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 May 2016 15:14:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156677#M28903</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-05-19T15:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156678#M28904</link>
      <description>&lt;P&gt;You could use the same script to import the data from your views: Sqoop will fetch the data from your view and store it into Hive/HDFS.&lt;/P&gt;&lt;P&gt;If you don't want to import the data but just want to create a view on Hive, then take the definition of your view in SQLserver (DDL) and create the same view in Hive (some few adaptations might be needed, check the documentation (&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/AlterView"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/AlterView&lt;/A&gt; ).&lt;/P&gt;&lt;P&gt;A recommendation I would also give you, is to do the Sqoop commands in parallel. Otherwise, if you have many tables and you use "-m 1", it will take a lot of time. You can check the script I wrote for that:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/23602/sqoop-fetching-lot-of-tables-in-parallel.html"&gt;https://community.hortonworks.com/articles/23602/sqoop-fetching-lot-of-tables-in-parallel.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 17:09:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156678#M28904</guid>
      <dc:creator>sluangsay</dc:creator>
      <dc:date>2016-05-19T17:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156679#M28905</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;i don't think sqoop has any different way to import views, it should work same as for tables. Can you please let us know what issue you are facing i.e any error messages? You can also use free form queries to import the view data.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 17:13:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156679#M28905</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-19T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156680#M28906</link>
      <description>&lt;DIV&gt;Hi !!!&lt;/DIV&gt;&lt;DIV&gt;Thank you. But I found what to do . I just had to add in my script, --split-by "colonne_id"&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 May 2016 16:14:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156680#M28906</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-05-23T16:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156681#M28907</link>
      <description>&lt;P&gt;Thank you for your suggestions&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 16:15:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156681#M28907</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-05-23T16:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: import the views of a sql server database</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156682#M28908</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt; can u share the script how u imported view using sqoop to hdfs&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 19:44:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-the-views-of-a-sql-server-database/m-p/156682#M28908</guid>
      <dc:creator>abhishekkundu86</dc:creator>
      <dc:date>2019-08-13T19:44:39Z</dc:date>
    </item>
  </channel>
</rss>

