<?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 How make SAS DI SQL transformation to use alternative library for pass-through in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-make-SAS-DI-SQL-transformation-to-use-alternative-library/m-p/414223#M12658</link>
    <description>&lt;P&gt;I am playing with pass-though option on SAS DI SQL transformations (SAS 9.4, SAS DI 4.9). My source and target objects are in different Oracle schemas and target schema can see source one's objects. I want to create a job to read data from source schema and&amp;nbsp; put result into target schema. The problem is that as soon as I invoke pass-though automatically generated code uses source library to connect to database, but I need it to use target one. Is there any way I can do it without user-defined code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a job in SAS DI using SQL SET transformation.&lt;/P&gt;&lt;P&gt;Source tables&amp;nbsp; (Table 1 and Table 2) physical location is in Oracle library "Source_library" (using authdomain Source_Auth); Target_Table is located in Oracle library "Target_library"&amp;nbsp;&lt;SPAN&gt;(using authdomain Target_Auth);&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The generated code look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ORACLE
(
    PATH="&amp;lt;database&amp;gt;" AUTHDOMAIN=Source_Auth"
);
execute
(
   insert into TARGET.TARGET_TABLE
   /* Returns all unique rows from the two query results.  */
   select distinct
      TABLE1.ID as ID
   from
      SOURCE.TABLE1 TABLE1
   union
   select distinct
      TABLE2.ID as ID
   from
      SOURCE.TABLE2 TABLE2
) by ORACLE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I need SAS DI to&amp;nbsp;look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ORACLE
(
    PATH="&amp;lt;database&amp;gt;" AUTHDOMAIN=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Target_Auth&lt;/STRONG&gt;&lt;/FONT&gt;"
);
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 02:56:24 GMT</pubDate>
    <dc:creator>AnnaMelnikova</dc:creator>
    <dc:date>2017-11-17T02:56:24Z</dc:date>
    <item>
      <title>How make SAS DI SQL transformation to use alternative library for pass-through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-make-SAS-DI-SQL-transformation-to-use-alternative-library/m-p/414223#M12658</link>
      <description>&lt;P&gt;I am playing with pass-though option on SAS DI SQL transformations (SAS 9.4, SAS DI 4.9). My source and target objects are in different Oracle schemas and target schema can see source one's objects. I want to create a job to read data from source schema and&amp;nbsp; put result into target schema. The problem is that as soon as I invoke pass-though automatically generated code uses source library to connect to database, but I need it to use target one. Is there any way I can do it without user-defined code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a job in SAS DI using SQL SET transformation.&lt;/P&gt;&lt;P&gt;Source tables&amp;nbsp; (Table 1 and Table 2) physical location is in Oracle library "Source_library" (using authdomain Source_Auth); Target_Table is located in Oracle library "Target_library"&amp;nbsp;&lt;SPAN&gt;(using authdomain Target_Auth);&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The generated code look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ORACLE
(
    PATH="&amp;lt;database&amp;gt;" AUTHDOMAIN=Source_Auth"
);
execute
(
   insert into TARGET.TARGET_TABLE
   /* Returns all unique rows from the two query results.  */
   select distinct
      TABLE1.ID as ID
   from
      SOURCE.TABLE1 TABLE1
   union
   select distinct
      TABLE2.ID as ID
   from
      SOURCE.TABLE2 TABLE2
) by ORACLE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I need SAS DI to&amp;nbsp;look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
connect to ORACLE
(
    PATH="&amp;lt;database&amp;gt;" AUTHDOMAIN=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Target_Auth&lt;/STRONG&gt;&lt;/FONT&gt;"
);
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 02:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-make-SAS-DI-SQL-transformation-to-use-alternative-library/m-p/414223#M12658</guid>
      <dc:creator>AnnaMelnikova</dc:creator>
      <dc:date>2017-11-17T02:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: How make SAS DI SQL transformation to use alternative library for pass-through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-make-SAS-DI-SQL-transformation-to-use-alternative-library/m-p/415090#M12669</link>
      <description>&lt;P&gt;I'm not sure if this would work, but try something like adding another input table as _INPUT1 which is from your target database, but don't use it in your query. I think DI will use _INPUT1 to determine the connection string.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 09:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-make-SAS-DI-SQL-transformation-to-use-alternative-library/m-p/415090#M12669</guid>
      <dc:creator>lethcons</dc:creator>
      <dc:date>2017-11-21T09:09:37Z</dc:date>
    </item>
  </channel>
</rss>

