SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How can I use The sas file with the most recent modification date in SAS DI studio.

Reply
New Contributor
Posts: 2

How can I use The sas file with the most recent modification date in SAS DI studio.

Hi.

 

I am New in sas di, and I  need to start my job invoking the sas table with most recent creation date between a library with a lot of tables with the same prefix, for example: I need to use the table clients_201709 within the following options

 

clients_201708

clients_201709

clients_201710

 

thanks in Advanced for all your help.

Respected Advisor
Posts: 4,186

Re: How can I use The sas file with the most recent modification date in SAS DI studio.

@SINNETIC

That's first of all a design question before it comes to implementation. How do you know which month to pick-up?

 

You can use macro variables for file names (i.e. clients_&yyyymm) so once you're able to populate such a macro variable things become simple.

 

 

Super User
Posts: 5,490

Re: How can I use The sas file with the most recent modification date in SAS DI studio.

My personal preference is not to use any physical partitioning of data into separate date (or other categorizations). The exceptions to this rule are:
- source data, usually common in data in tranfered files. Timestamps in file name prevents from unintentional overwrites. But since you refer to SAS data sets, I assume they are not vonsifders5as source data.
- Data prepared for being part of a SPD Server cluster table (or even any other external data store that support partitioning).

The benefit by not having separate tables is you don't need to tamper with macro variable names in meta data objects physical names. That logic would then probably still need some considerations when defining where clauses.
Data never sleeps
Ask a Question
Discussion stats
  • 2 replies
  • 168 views
  • 0 likes
  • 3 in conversation