BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
forumsguy
Fluorite | Level 6

Hi there,

Can somebody give me guideline on how to achieve this using  SAS DI loop transform...

Flow is SAS Base Table =====> Table Loader======> Staging Table

This SAS Base Table has structure of

Column1 Column2 Filename

1 2 file1.csv

2 3  file2.csv

3 4 file3.csv

Now in my Final Staging Table I  have unique ID which I am getting from my audit table

Column1 Column2 Filename File_ID

1 2 file1.csv 367

2 3  file2.csv 385

3 4 file3.csv 396

So basically I need to iterate this job for all groups of filenames from my input table. I hope I am clear with my requirement and making sense....

1 ACCEPTED SOLUTION

Accepted Solutions
Halaku
Obsidian | Level 7

Create the inner job that you want to run in the loop. the job should have INPUT parameters defined.

These input parameters will be mapped later.

1. Put a LOOP transformation and link it to stage-table.

2. Open 'Parameter Mapping' tab of the LOOP and map the parameters you want, Column1 and File_Id in your case.

Put the END LOOP and the end.

Run the job.

View solution in original post

2 REPLIES 2
Halaku
Obsidian | Level 7

Create the inner job that you want to run in the loop. the job should have INPUT parameters defined.

These input parameters will be mapped later.

1. Put a LOOP transformation and link it to stage-table.

2. Open 'Parameter Mapping' tab of the LOOP and map the parameters you want, Column1 and File_Id in your case.

Put the END LOOP and the end.

Run the job.

forumsguy
Fluorite | Level 6

Thank you very much.. it worked... now can somebody help me in integrating this in one job itself... because this is for loading csv files in table and we will have around 50 fact tables so this will create about 100 jobs which are difficult to maintain......

Please find attached snapshot of my outer and inner job... can we do both these things in same job is my question...

job1.JPG

Job2.JPG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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