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

Generating CSV file in DI Studio

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

Generating CSV file in DI Studio

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


Accepted Solutions
Solution
‎09-07-2011 02:01 PM
Occasional Contributor
Posts: 16

Generating CSV file in DI Studio

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


All Replies
SAS Super FREQ
Posts: 3,755

Generating CSV file in DI Studio

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

Solution
‎09-07-2011 02:01 PM
Occasional Contributor
Posts: 16

Generating CSV file in DI Studio

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.

Contributor
Posts: 21

Generating CSV file in DI Studio

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

Super User
Posts: 5,441

Re: Generating CSV file in DI Studio

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
Occasional Contributor
Posts: 16

Generating CSV file in DI Studio

Hi Liang,

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

hobbes

Contributor
Posts: 21

Generating CSV file in DI Studio

Dear Hobbes and LinusH;

I sloved the problem, thanks everyone for replied..

Thanks again:

Regard

Liangck

🔒 This topic is solved and locked.

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

Discussion stats
  • 6 replies
  • 1592 views
  • 6 likes
  • 4 in conversation