BookmarkSubscribeRSS Feed
dirks
Quartz | Level 8

How does this transformation work? I m trying to export a csv from DIS. I cant find any information in the manual or anywhere else.

4 REPLIES 4
LinusH
Tourmaline | Level 20

Unfortunately, this is not one of the best transformations in DI Studio.

This and the File Reader transformations rely quite much on the external file metadata, which leads to some confusion since some options there are named for import (INFILE/INPUT) rather than export.

It takes a little trial and error, but basically it will work like the File Reader.

 

There are some other posts here on the subject that might give some hints?

Data never sleeps
dirks
Quartz | Level 8

What are you searching for? I couldn't find anything helpful. I also dont understand why it has to be such a painful procedure to do something as simple as exporting data into a textfile.

 

I helped myself by creating a user written transformation.

 

proc export data = WORK.OUTPUT
outfile = exprt
dbms=dlm replace;
putnames=yes;
delimiter=';';
run;

 

Whats the problem creating an easy inputmask and make all options clickable...

 

Anyways, is there any documentation on how to use the File Writer?

Patrick
Opal | Level 21

DIS is metadata driven so in order to write to any external file you first need a metadata definition of this external file (External File).

It's then this External File metadata definition which drives code generation (so that's the place where you define that it's a .csv and not in the File Writer).

 

You find step by step instructions of how to use the File Writer transformation directly in the help section of DIS.

Capture.PNG

 

You can also get to DIS documentation with a simple Google search like:

site:support.sas.com dis 4.9 file writer

 

Which then returns results like:

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

 

 

If you're an experienced SAS coder then coding directly is sometimes quicker than figuring out how it's done via metadata. User Written code is not good practice and should always be your last resort - which isn't the case here.

dirks
Quartz | Level 8

Thank you for pointing that out. I searched on the SAS support, but couldnt find it.

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
  • 4 replies
  • 4636 views
  • 1 like
  • 3 in conversation