<?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: Working on updated data only. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392434#M25293</link>
    <description>&lt;P&gt;It means that I should create one column in final output with name LastETLRuns. and put a condition on that? which will give me only updated observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2017 05:29:07 GMT</pubDate>
    <dc:creator>india2016</dc:creator>
    <dc:date>2017-09-01T05:29:07Z</dc:date>
    <item>
      <title>Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392326#M25291</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Actually, I am trying to solve one problem,&lt;BR /&gt;I have one dataset which will update daily (automatically).. (Dataset "B").&lt;BR /&gt;and my ETL works on that dataset. Now my new requirement is to work on only delta record.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;..&lt;BR /&gt;requirements:&lt;/P&gt;&lt;P&gt;1) In that dataset one column(i.e. DATEofComplaint) will updated (on which I want to work) and I want only those observations which were updated till yesterday from lasttime ETL Runs.&lt;BR /&gt;even if ETL was not run for few days .&lt;/P&gt;&lt;P&gt;2) even if ETL runs two or more times in a day, then also data will get until yesterday ..&lt;BR /&gt;and then&lt;/P&gt;&lt;P&gt;3) I am appending output data to permanant Dataset (i.e. "F") so in that duplicate observations are not allowed and I can't use NODUP or NODUPKEY for that permanent dataset because dataset is very large.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.....................................................................................................................&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am exporting system date to know on which Day ETL runs last time.&lt;/P&gt;&lt;P&gt;(Suppose this ETL last time RUNS on 28AUG2017 then "lastETLDate" will 27AUG2017 )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;STEP 1:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data sasdata.SystemDate;&lt;BR /&gt;format LastETLDate date9.;&lt;BR /&gt;LastETLDate=today()-1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..............&lt;BR /&gt;Step 2:&lt;BR /&gt;then importing that date&lt;BR /&gt;(27AUG2017)&lt;BR /&gt;..............&lt;BR /&gt;Step 3:&lt;BR /&gt;Suppose today's date is 01SEP2017&lt;/P&gt;&lt;P&gt;data kk;&lt;BR /&gt;A=today()-1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;A=31AUG2017&lt;BR /&gt;..............&lt;BR /&gt;Step 4:&lt;/P&gt;&lt;P&gt;data QueryFoRB;&lt;BR /&gt;set sasdata.B;&lt;BR /&gt;where DateofComplaint between LastETLDate and A;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;Now, what should I do to overcome the problem of appending duplicate records when ETL runs two or more time in day....&lt;BR /&gt;because in last step of ETL I made code that will append data to a permanant dataset which comes from Step 4.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for reference, I have attached a rough diagram of SAS EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;program or any suggestion will be appreciated.&lt;/P&gt;&lt;P&gt;Thank you very much.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 18:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392326#M25291</guid>
      <dc:creator>india2016</dc:creator>
      <dc:date>2017-08-31T18:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392409#M25292</link>
      <description>&lt;P&gt;You need to store date and time in&amp;nbsp;&lt;SPAN&gt;lastETLDate column. &amp;nbsp;Each would update run lastETLDatetime and &amp;nbsp;lastETLDatetime should be same for all new records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next time whenever you are want to run the ETL then find maximum&amp;nbsp;lastETLDatetime.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Records updated after maximum&amp;nbsp;lastETLDatetime&amp;nbsp;should be considered.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 02:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392409#M25292</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2017-09-01T02:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392434#M25293</link>
      <description>&lt;P&gt;It means that I should create one column in final output with name LastETLRuns. and put a condition on that? which will give me only updated observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 05:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392434#M25293</guid>
      <dc:creator>india2016</dc:creator>
      <dc:date>2017-09-01T05:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392438#M25294</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you intend to run only once in a day then you can live with date value and if you intend to run more than one time in a day then you should go for datetime value to differentiate exections carried out in one single day.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 06:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392438#M25294</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2017-09-01T06:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392485#M25298</link>
      <description>It's considered best practice to have a timestamp column in each table reflecting the last update operation.  Not only when you get a requirement like this.</description>
      <pubDate>Fri, 01 Sep 2017 11:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392485#M25298</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-09-01T11:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Working on updated data only.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392488#M25300</link>
      <description>If you only have daily inserts, consider to have a daily pile table separate from the total table. Accessing this would be considerably cheaper than querying the whole history.</description>
      <pubDate>Fri, 01 Sep 2017 11:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Working-on-updated-data-only/m-p/392488#M25300</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-09-01T11:24:16Z</dc:date>
    </item>
  </channel>
</rss>

