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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 725 views
  • 0 likes
  • 2 in conversation