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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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