BookmarkSubscribeRSS Feed
TomekQ
Calcite | Level 5

Hi!

 

How can we create parameters for SAS DI jobs by reading a .csv file. For example, I would like to select all rows with where clause with parameters from the .csv file.

 

Regards

1 REPLY 1
LinusH
Tourmaline | Level 20

There are of course several ways of doing, what to chose is based on your detailed requirement.

 

One way is to import the csv to a SAS data set, and then perform an inner join or WHERE x IN(subquery...) construct.

Another way is to again import the csv file, and then use it as a driver to a loop transformation, where you map you file contents to job parameters (which you can use as macro variables in the "inner" job).

 

Data never sleeps

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 498 views
  • 0 likes
  • 2 in conversation