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

Help needed with Loop transformation

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 85
Accepted Solution

Help needed with Loop transformation

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


Accepted Solutions
Solution
‎02-09-2012 03:51 PM
Contributor
Posts: 38

Help needed with Loop transformation

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


All Replies
Solution
‎02-09-2012 03:51 PM
Contributor
Posts: 38

Help needed with Loop transformation

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.

Frequent Contributor
Posts: 85

Help needed with Loop transformation

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1108 views
  • 0 likes
  • 2 in conversation