<?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: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899968#M355675</link>
    <description>&lt;P&gt;I've noticed that using the complete notation for tables, like "DATABASE"."SCHEMA"."TABLE" (e.g., "SOURCE"."PUBLIC"."TESTTABLE"), seems to be a key factor in resolving the issue.&lt;/P&gt;&lt;P&gt;In this scenario, it appears that when SAS Data Integration Studio automatically includes the database name in the statements, data loading onto Snowflake works without errors. The question now is how to configure SAS Data Integration Studio to consistently use this notation for all table references.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 14:19:41 GMT</pubDate>
    <dc:creator>jozumhannes</dc:creator>
    <dc:date>2023-10-25T14:19:41Z</dc:date>
    <item>
      <title>ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a join</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899934#M355661</link>
      <description>&lt;P&gt;I'm encountering an error, and I need some assistance. The error message I'm facing is: "ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a join across librefs with different connection properties."&lt;/P&gt;&lt;P&gt;Here's the context: I'm in the process of transferring a table from one library to another using SAS Data Integration. The destination for this data is Snowflake.&lt;/P&gt;&lt;P&gt;I'd appreciate any guidance or insights on resolving this issue. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 12:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899934#M355661</guid>
      <dc:creator>jozumhannes</dc:creator>
      <dc:date>2023-10-25T12:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899936#M355662</link>
      <description>&lt;P&gt;Is the source data also from Snowflake?&lt;/P&gt;
&lt;P&gt;This is what the documention say:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n06hpji71icfevn1pn9bp8zoxu7z.htm" target="_blank"&gt;SAS Help Center: Passing Joins to the DBMS&lt;/A&gt;&lt;/P&gt;
&lt;H2 id="n0enbbl4uvizvyn1sjeklijg3g3v" class="xisDoc-title"&gt;"Passing Joins That Use Two or More LIBNAME Statements&lt;/H2&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;SPAN class="xisDoc-nobr"&gt;SAS/ACCESS&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can pass down JOIN operations when more than one LIBNAME statement is involved. In this case,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-nobr"&gt;SAS/ACCESS&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;starts by comparing the LIBNAME statements to see whether they are equivalent. Two LIBNAME connections are equivalent when they share these attributes:&lt;/P&gt;
&lt;UL class="xisDoc-listUnordered"&gt;
&lt;LI class="xisDoc-item"&gt;database source types&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;connection options, including the user ID, server, and so on&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="xisDoc-paragraph"&gt;Equivalent LIBNAME connections can connect to different database instances, as long as they are the same type of database and are on the same server. If the LIBNAME statements are determined to be equivalent, then a JOIN operation that uses both LIBNAME connections can be passed to the DBMS.&lt;/P&gt;
&lt;DIV id="p14s1vgh8etwgan18wsyivbwwozm" class="xisDoc-note"&gt;&lt;SPAN class="xisDoc-noteGenText"&gt;Note:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;When you join tables across multiple LIBNAME connections, implicit pass-through uses the first connection to process the data. LIBNAME options from subsequent connections are ignored."&lt;/DIV&gt;
&lt;DIV class="xisDoc-note"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xisDoc-note"&gt;You may get more hints by using these options:&lt;/DIV&gt;
&lt;DIV class="xisDoc-note"&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;
So in short, compre the librefs and see if they meet the criteria (probably not...).&lt;/DIV&gt;
&lt;DIV class="xisDoc-note"&gt;The work-around would to do a an explicit SQL pass through.&lt;/DIV&gt;
&lt;DIV class="xisDoc-note"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Oct 2023 12:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899936#M355662</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-10-25T12:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899942#M355664</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Yes, both the source and target tables are in the Snowflake database.&lt;/P&gt;&lt;P&gt;Regarding the code: I've already included the following options in my code: options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;&lt;/P&gt;&lt;P&gt;The interesting part is that, without these options, the job runs and is marked as "successfully completed." However, when I include the code, it results in the error message mentioned above. I'm still investigating this issue and will certainly consider your suggestion of using explicit SQL pass-through. If you have any more insights or recommendations, I'd greatly appreciate them.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 12:33:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899942#M355664</guid>
      <dc:creator>jozumhannes</dc:creator>
      <dc:date>2023-10-25T12:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899944#M355666</link>
      <description>Additionally, I've noticed that when I execute the Extract Job using SAS Data Integration Studio, it appears to generate a problem in the Snowflake log. It seems that the job first drops the table and then tries to select from it, which is the opposite of what's specified in the SAS DI Code (where the order makes more sense).</description>
      <pubDate>Wed, 25 Oct 2023 12:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899944#M355666</guid>
      <dc:creator>jozumhannes</dc:creator>
      <dc:date>2023-10-25T12:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899962#M355672</link>
      <description>I don't think it's "real" error message. You you can check the return code after the step to be sure. &lt;BR /&gt;But the problem is if the tabels are large a join in SAS probably takes longer time than a correspodning Snowflake join would take.&lt;BR /&gt;I don't have any other suggestion at this point than comparing the two librefs and try to make them compatible, so the join could be sent to the Snowflake.</description>
      <pubDate>Wed, 25 Oct 2023 13:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899962#M355672</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-10-25T13:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899963#M355673</link>
      <description>Can't really help out here without a log to analyse (ideally SAS + SF)</description>
      <pubDate>Wed, 25 Oct 2023 13:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899963#M355673</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-10-25T13:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899968#M355675</link>
      <description>&lt;P&gt;I've noticed that using the complete notation for tables, like "DATABASE"."SCHEMA"."TABLE" (e.g., "SOURCE"."PUBLIC"."TESTTABLE"), seems to be a key factor in resolving the issue.&lt;/P&gt;&lt;P&gt;In this scenario, it appears that when SAS Data Integration Studio automatically includes the database name in the statements, data loading onto Snowflake works without errors. The question now is how to configure SAS Data Integration Studio to consistently use this notation for all table references.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 14:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899968#M355675</guid>
      <dc:creator>jozumhannes</dc:creator>
      <dc:date>2023-10-25T14:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: This SQL statement will not be passed to the DBMS for processing because it involves a jo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899970#M355676</link>
      <description>I don't DI Studio (or SAS for that matters) uses anything else but a two level notation (libref.table). &lt;BR /&gt;DI Studio might do it if you use the explicit pass through option (availble in Join).&lt;BR /&gt;And SAS/ACCESS might produce threel level anme in the engine itself.&lt;BR /&gt;Agian, any code/logs would help understanding what your are facing.</description>
      <pubDate>Wed, 25 Oct 2023 14:28:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-This-SQL-statement-will-not-be-passed-to-the-DBMS-for/m-p/899970#M355676</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-10-25T14:28:18Z</dc:date>
    </item>
  </channel>
</rss>

