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

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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