<?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>topic Hive external partitions using SAS access to Hadoop interface in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483323#M286942</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my current project, we have a requirement to load SAS datasets into HDFS using SAS access to Hadoop.&lt;/P&gt;&lt;P&gt;In this, we are supposed to create external partitions (as we have in HIVEQL) using SAS access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me with the options if any to create external partitions and during a reload we are supposed to drop those partitions as well.&lt;/P&gt;&lt;P&gt;I have seen that we can use DB_CREATE_TABLE_OPTS and use an existing partition but my requirement is to add an external partition which is not existing already in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if any other details are required.&lt;/P&gt;&lt;P&gt;Quick response would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Yamini&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 09:18:40 GMT</pubDate>
    <dc:creator>nagayamini</dc:creator>
    <dc:date>2018-08-02T09:18:40Z</dc:date>
    <item>
      <title>Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483323#M286942</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my current project, we have a requirement to load SAS datasets into HDFS using SAS access to Hadoop.&lt;/P&gt;&lt;P&gt;In this, we are supposed to create external partitions (as we have in HIVEQL) using SAS access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me with the options if any to create external partitions and during a reload we are supposed to drop those partitions as well.&lt;/P&gt;&lt;P&gt;I have seen that we can use DB_CREATE_TABLE_OPTS and use an existing partition but my requirement is to add an external partition which is not existing already in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if any other details are required.&lt;/P&gt;&lt;P&gt;Quick response would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Yamini&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 09:18:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483323#M286942</guid>
      <dc:creator>nagayamini</dc:creator>
      <dc:date>2018-08-02T09:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483358#M286943</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92632"&gt;@nagayamini&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may find the following HiveQL statements helpful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ALTER TABLE myschema.table1 ADD IF NOT EXISTS PARTITION (mydate='2018-07-04') &lt;BR /&gt;   LOCATION 'hdfs://some/hdfs/filesystem/months/mydate=2018-07-04'

ALTER TABLE myschema.table1 DROP PARTITION (mydate='2018-07-04');&lt;/PRE&gt;
&lt;P&gt;These statements can be placed in SAS EXECUTE(...) BY HADOOP statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update - example EXECUTE statements...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;LIBNAME myHDP HADOOP ... some valid LIBNAME statement;

PROC SQL;
CONNECT USING myHDP;
EXECUTE(ALTER TABLE myschema.table1 ADD IF NOT EXISTS PARTITION (mydate='2018-07-04') 
   LOCATION 'hdfs://some/hdfs/filesystem/months/mydate=2018-07-04') BY myHDP;

EXECUTE(ALTER TABLE myschema.table1 DROP PARTITION 
 (mydate='2018-07-04') ) BY myHDP;
QUIT;

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;BR /&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 19:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483358#M286943</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-08-08T19:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483624#M286944</link>
      <description>&lt;P&gt;Do you want&amp;nbsp;dynamic or static partitions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the table is created with option PARTITIONED BY it will be partitioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then add dynamic partitions with something like:&lt;/P&gt;
&lt;P&gt;ALTER TABLE test ADD PARTITION (dt='2014-03-05')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;you can insert data with:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;INSERT INTO TABLE&amp;nbsp;test PARTITION(dt='2014-03-05') SELECT a,b,c,d from table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 23:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/483624#M286944</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-02T23:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485088#M286945</link>
      <description>&lt;P&gt;Thanks for the solution Jeff, but I can see that merge and alter statements are not supported in SAS Execute as per below link.&lt;/P&gt;&lt;P&gt;I even tried using merge syntax of HIVE in this execute statement but it is giving an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advise other alternative for this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#execute.html" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#execute.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 11:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485088#M286945</guid>
      <dc:creator>nagayamini</dc:creator>
      <dc:date>2018-08-08T11:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485089#M286946</link>
      <description>&lt;P&gt;Hi Chriz,&lt;/P&gt;&lt;P&gt;I would like to add dynamic partitions using SAS Access to Hadoop interface in which I can't directly use alter command which you mentioned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As stated by Jeff, need to use execute in order to use DBMS specific queries.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 11:27:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485089#M286946</guid>
      <dc:creator>nagayamini</dc:creator>
      <dc:date>2018-08-08T11:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485093#M286947</link>
      <description>&lt;P&gt;&lt;EM&gt;need to use execute in order to use DBMS specific queries. I can't directly use alter command which you mentioned.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Of course you can.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;libname HAD001 hadoop ... ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sql;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; connect using HAD001;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; execute by HAD001 ( alter table ...&amp;nbsp; ) ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 11:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485093#M286947</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-08T11:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485252#M286948</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92632"&gt;@nagayamini&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have updated my response. Your link is bad...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 19:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/485252#M286948</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-08-08T19:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/491133#M286949</link>
      <description>&lt;P&gt;Thank you Jeff, it worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 08:32:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/491133#M286949</guid>
      <dc:creator>nagayamini</dc:creator>
      <dc:date>2018-08-30T08:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hive external partitions using SAS access to Hadoop interface</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/491200#M286950</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92632"&gt;@nagayamini&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My pleasure!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 12:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hive-external-partitions-using-SAS-access-to-Hadoop-interface/m-p/491200#M286950</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-08-30T12:38:12Z</dc:date>
    </item>
  </channel>
</rss>

