BookmarkSubscribeRSS Feed
Rahul_SAS
Quartz | Level 8

Hi Experts,

 

In order to automate my report, I completed all ETL precess and created a final table. Now I have to load to CAS with an incremental load. Using SQL Server as data source.

Can anyone help me to provide an efficient sample code that loads the table on a daily basis by remove the last 10 days of data and load it again.

 

Thanks
Rahul

4 REPLIES 4
Daryl
SAS Employee
Rahul,
Can you give a more concrete example with a sample table please?
Daryl
Rahul_SAS
Quartz | Level 8

Hi Daryl,

 

Attached here the sample data. Have1 has data till 25th April 2020 and Have2 has data till 26th April i.e today and the data gets updated on a daily basis. There are chances that the last 5 days data can be modified so always while loading data I need to delete the last 5 days of data or overwrite. This how I need to set up incremental.

In data Have2 marked few rows as edited.

 

Thanks

Rahul

Rahul_SAS
Quartz | Level 8

Hi Daryl,

 

Attached here the sample data. Have1 has data till 25th April 2020 and Have2 has data till 26th April i.e today and the data gets updated on a daily basis. There are chances that the last 5 days data can be modified so always while loading data I need to delete the last 5 days of data or overwrite. This how I need to set up incremental.

In data Have2 marked few rows as edited.

 

Thanks

Rahul

Daryl
SAS Employee

So HAVE1 is what is loaded as of April 25. You want to drop the last 10 days of data from HAVE1 and insert the last 11 days (10 prior days, plus April 26 data) from the incremental set?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1584 views
  • 0 likes
  • 2 in conversation