<?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: How surrogate key generator works with (option: increment from maximum value in target table) in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574894#M17641</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273243"&gt;@cmurugesan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17429"&gt;@LaurieF&lt;/a&gt;&amp;nbsp;thanks Lauri you brought up a good point. yes, it is indexed key column but still referring sequence is a faster way than going to table/index.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it would be great referring sequence if we want to load input files in parallel to the same target table. it is surprising to me why SAS not having an option to refer sequence for key generator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273243"&gt;@cmurugesan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most DIS transformations are first written to work with SAS files (SAS tables). Database specific behaviour for such transformations is mostly only partially implemented. I guess adding more database specific options would over-complicate the transformations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like you I'd wish there would come more database specific transformations already out of the box but.... You can always implement your own reusable custom transformations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is about loading from Oracle to Oracle table then I'd most certainly go for a custom transformation which generates explicit pass-through SQL and there you can use any Oracle specific syntax like calling a sequence object.&lt;/P&gt;
&lt;P&gt;You could also have Oracle populate your id column directly either by calling the sequence object via an after insert trigger or beginning with Oracle 12c by using an identity column.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1" target="_blank"&gt;https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 09:58:07 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-07-19T09:58:07Z</dc:date>
    <item>
      <title>How surrogate key generator works with (option: increment from maximum value in target table)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574681#M17638</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I am new to SAS world and have little experience in Oracle. Based on my oracle experience it is better to use sequence for any number (key) field as the sequence saves the current value and next value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I see below options in "Surrogate key generator" (DI studio)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;increment from maximum value in target table&lt;/P&gt;&lt;P&gt;2)increment from specified value&lt;/P&gt;&lt;P&gt;3)increment based on another table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My system loads millions and millions of data daily. What I read from option 1 as "select max value from dim_tab" before proceeding the number generation. isn't it performance issue when I have millions (approx 100 million records)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 17:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574681#M17638</guid>
      <dc:creator>cmurugesan</dc:creator>
      <dc:date>2019-07-18T17:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: How surrogate key generator works with (option: increment from maximum value in target table)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574842#M17639</link>
      <description>&lt;P&gt;If there's no index on the column, yes: it'll do a table scan. If you've got an index on it though, it should be quite responsive. I'd be surprised if it'd take more than a few seconds then.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 01:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574842#M17639</guid>
      <dc:creator>LaurieF</dc:creator>
      <dc:date>2019-07-19T01:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How surrogate key generator works with (option: increment from maximum value in target table)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574860#M17640</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17429"&gt;@LaurieF&lt;/a&gt;&amp;nbsp;thanks Lauri you brought up a good point. yes, it is indexed key column but still referring sequence is a faster way than going to table/index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it would be great referring sequence if we want to load input files in parallel to the same target table. it is surprising to me why SAS not having an option to refer sequence for key generator.&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>Fri, 19 Jul 2019 03:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574860#M17640</guid>
      <dc:creator>cmurugesan</dc:creator>
      <dc:date>2019-07-19T03:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How surrogate key generator works with (option: increment from maximum value in target table)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574894#M17641</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273243"&gt;@cmurugesan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17429"&gt;@LaurieF&lt;/a&gt;&amp;nbsp;thanks Lauri you brought up a good point. yes, it is indexed key column but still referring sequence is a faster way than going to table/index.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it would be great referring sequence if we want to load input files in parallel to the same target table. it is surprising to me why SAS not having an option to refer sequence for key generator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273243"&gt;@cmurugesan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most DIS transformations are first written to work with SAS files (SAS tables). Database specific behaviour for such transformations is mostly only partially implemented. I guess adding more database specific options would over-complicate the transformations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like you I'd wish there would come more database specific transformations already out of the box but.... You can always implement your own reusable custom transformations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is about loading from Oracle to Oracle table then I'd most certainly go for a custom transformation which generates explicit pass-through SQL and there you can use any Oracle specific syntax like calling a sequence object.&lt;/P&gt;
&lt;P&gt;You could also have Oracle populate your id column directly either by calling the sequence object via an after insert trigger or beginning with Oracle 12c by using an identity column.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1" target="_blank"&gt;https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 09:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/574894#M17641</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-19T09:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How surrogate key generator works with (option: increment from maximum value in target table)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/575000#M17642</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17429"&gt;@LaurieF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The online help in DI Studio provides a bit more information:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DI_surrogate_key.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31159i1E186F78EC7D68EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="DI_surrogate_key.png" alt="DI_surrogate_key.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 16:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-surrogate-key-generator-works-with-option-increment-from/m-p/575000#M17642</guid>
      <dc:creator>cmurugesan</dc:creator>
      <dc:date>2019-07-19T16:00:09Z</dc:date>
    </item>
  </channel>
</rss>

