<?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 Re: Keep and where statement in SAS Hadoop passthrough in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882433#M348632</link>
    <description>&lt;P&gt;To be correct, you have used data set options, not statements (KEEP and WHERE).&lt;/P&gt;
&lt;P&gt;I see no reason to use them at all, KEEP= does exactly the same as the SELECT statement.&lt;/P&gt;
&lt;P&gt;WHERE works equally good as a data set options and as a SQL statement.&lt;/P&gt;
&lt;P&gt;In fact, you should be able to write implicit pass through with this logic with the same performance, reducing the complexity of our code, and make it less RDBMS dependent (requires a hadoop libname):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
  create table work.test as
   select acct_id, billing_date, balance  
    FROM datab.acc_history 
    where acct_id= "123456";
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Jun 2023 13:30:03 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2023-06-26T13:30:03Z</dc:date>
    <item>
      <title>Keep and where statement in SAS Hadoop passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882163#M348541</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just wondering if you can put a keep and where statement with a from statement within a hadoop pass through. See example below - thank you in advance Adnan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sql; 
connect to hadoop ( &amp;amp;connect. );
    create table work.test as
    select * from connection to hadoop
    (
select
acct_id, billing_date, balance  FROM datab.acc_history (keep = acct_id, billing_date, balance where acct_id= "123456")
);
disconnect from hadoop;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 16:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882163#M348541</guid>
      <dc:creator>Adnan2</dc:creator>
      <dc:date>2023-06-23T16:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Keep and where statement in SAS Hadoop passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882166#M348543</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did the LOG say anything strange when you tried this out?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/2658"&gt;@FrederikV&lt;/a&gt;&amp;nbsp;can help you out?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 16:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882166#M348543</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-06-23T16:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Keep and where statement in SAS Hadoop passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882168#M348544</link>
      <description>&lt;P&gt;The code being passed to Hadoop has to be Hadoop code.&amp;nbsp; Not SAS code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(
select acct_id, billing_date, balance
FROM datab.acc_history 
where acct_id= '123456'
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So no dataset options.&amp;nbsp; Also most other SQL implementations require single quotes for string constants.&amp;nbsp; Double quotes are used around object (variables or datasets or schemas) names.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 16:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882168#M348544</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-23T16:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Keep and where statement in SAS Hadoop passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882433#M348632</link>
      <description>&lt;P&gt;To be correct, you have used data set options, not statements (KEEP and WHERE).&lt;/P&gt;
&lt;P&gt;I see no reason to use them at all, KEEP= does exactly the same as the SELECT statement.&lt;/P&gt;
&lt;P&gt;WHERE works equally good as a data set options and as a SQL statement.&lt;/P&gt;
&lt;P&gt;In fact, you should be able to write implicit pass through with this logic with the same performance, reducing the complexity of our code, and make it less RDBMS dependent (requires a hadoop libname):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
  create table work.test as
   select acct_id, billing_date, balance  
    FROM datab.acc_history 
    where acct_id= "123456";
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 13:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-and-where-statement-in-SAS-Hadoop-passthrough/m-p/882433#M348632</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-06-26T13:30:03Z</dc:date>
    </item>
  </channel>
</rss>

