DATA Step, Macro, Functions and more

SAS Incremental update / Delta upload

Accepted Solution Solved
Reply
Contributor
Posts: 37
Accepted Solution

SAS Incremental update / Delta upload

Hi Gurus,

 

I have a oracle DB and trying to keep a subset of its data and store it in Sas7dat, one issue is that the oracle b may change the record ( e.g. invoice from valid to cancel) and i need to do incremental update (considering indexing apply)  , are there any efficient way to check if there is any update need in the current sas dataset and how to do the update in best practice?

 

Thanks guys


Accepted Solutions
Solution
‎02-05-2017 02:34 AM
Super User
Posts: 3,112

Re: SAS Incremental update / Delta upload

The key here would be identifying any changed records in your Oracle table. Does it contain a "last updated date" column for example. If so it would be easy to extract a subset of the rows that have changed since the SAS table was last updated, then update the SAS version.

 

I also assume you will need to track additions and deletions. Additions can be identified by querying any rows added since the last updated date. Deletions will depend on whether these are kept in your data and marked as "closed/deleted" - easy - or are actually physically deleted - this would be a lot harder to track.

 

 

View solution in original post


All Replies
Solution
‎02-05-2017 02:34 AM
Super User
Posts: 3,112

Re: SAS Incremental update / Delta upload

The key here would be identifying any changed records in your Oracle table. Does it contain a "last updated date" column for example. If so it would be easy to extract a subset of the rows that have changed since the SAS table was last updated, then update the SAS version.

 

I also assume you will need to track additions and deletions. Additions can be identified by querying any rows added since the last updated date. Deletions will depend on whether these are kept in your data and marked as "closed/deleted" - easy - or are actually physically deleted - this would be a lot harder to track.

 

 

Super User
Posts: 5,260

Re: SAS Incremental update / Delta upload

It sounds tedious to keep two data sets in sync like this. Why do you need a copy in SAS?
Your Oracle DBA should be able to tell you if/how to get delta records.
Data never sleeps
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 140 views
  • 1 like
  • 3 in conversation