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

HI there.

I am new to sas and i now using DI Studio as a start.

Having problem,hope someone will get me an answer.

The problem : "is that possible to generate a bunch of csv file by branches(thats my sas table design, i have serveral branches) from a datasets?(data alreadly combine into one sas fact table)"

Is that able to do so?

Thanks for your help. Apperciate it..

Thanks

Regards

LiangCk

1 ACCEPTED SOLUTION

Accepted Solutions
Hobbes
Calcite | Level 5

In DIS 3.4 (the version I currently use) you can achive this using a parameterized job.

1 - You should build a parameterized job. Don't forget to use the same parameter (macro name) in the filename of the file registered or not in the metadata and if it's registerd don't forget to select the option "Double quotes around filename", too.

3 - Create a new job dragging the previous job into it. Then add a [Loop] and [Loop End] transformation previous and after the job, respectively

4 - Before the Loop transformation add a dataset containing a column with all the parameters that you want to pass to the job. In the Loop transformation [Parameter Mapping] tab link the column of the table with the parameter you created.

6 -  Submit the job

In DIS 4.2 you can give a look in here:

http://support.sas.com/documentation/cdl/en/etlug/60948/HTML/default/viewer.htm#p1cqcd3acjwls2n0z9lm...

I never worked with it but, I suppose, it follows the same principle.

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

Welcome to SAS and the SAS discussion forums. Please ask this question at the Enterprise Data Management and Integration forum: http://communities.sas.com/community/sas_enterprise_data_management_integration

The DI Studio experts will be happy to help you.

Regards,

Rick

SAS/IML blog: http://blogs.sas.com/content/iml

Hobbes
Calcite | Level 5

In DIS 3.4 (the version I currently use) you can achive this using a parameterized job.

1 - You should build a parameterized job. Don't forget to use the same parameter (macro name) in the filename of the file registered or not in the metadata and if it's registerd don't forget to select the option "Double quotes around filename", too.

3 - Create a new job dragging the previous job into it. Then add a [Loop] and [Loop End] transformation previous and after the job, respectively

4 - Before the Loop transformation add a dataset containing a column with all the parameters that you want to pass to the job. In the Loop transformation [Parameter Mapping] tab link the column of the table with the parameter you created.

6 -  Submit the job

In DIS 4.2 you can give a look in here:

http://support.sas.com/documentation/cdl/en/etlug/60948/HTML/default/viewer.htm#p1cqcd3acjwls2n0z9lm...

I never worked with it but, I suppose, it follows the same principle.

Liangck
Calcite | Level 5

Thanks Hobbes:

I Have one more question, Hope Sir or someone can answer me..

In DI studio, if we wanted to generate(MEAN CREATE Not UPDATE) a plain text file(either csv or txt) we can used File Writter Transformation tools to get its done is it?

Assume its correct, thats mean the bunch of  genererated plain text located in specific location where I specified such as C:\Data\(??).txt and that is that also mean i dont need to pre-register all the text file in metadata is it?

Can anyone verified the statement what i said and if theres is anythings goes wrong,please dont hensitate to correct me.

Apperciate your help...thanks...

Thanks you

LinusH
Tourmaline | Level 20

You don't really "have to" register anything, but it's good practice register at least some kind of object that describes your output data. The name and location however, can be set by using macro variables if you like, and you parameterize your export job, and call it from an outer job that i.e. sets these macro variables dynamically. I suggest that you try some of this and dig into the documentation. Good luck!

/Linus

Data never sleeps
Hobbes
Calcite | Level 5

Hi Liang,

I agree 100% with Linus: you don't "have to" but is allways a good pratice.

hobbes

Liangck
Calcite | Level 5

Dear Hobbes and LinusH;

I sloved the problem, thanks everyone for replied..

Thanks again:

Regard

Liangck

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 6 replies
  • 3277 views
  • 6 likes
  • 4 in conversation