Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How can we export dataset from enterprise Miner as a csv file or text file?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

How can we export dataset from enterprise Miner as a csv file or text file?

Hi,

Do we have any node that can do the job of exporting a sas data set from enterprise miner. Also, can  anybody provide me with the code to export sas data set from enterprise miner to SQL Server DB directly.


Accepted Solutions
Solution
‎07-06-2017 01:30 PM
SAS Employee
Posts: 106

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Posted in reply to PruthviBhupathiraju

For your first question, check out the Save Data node in the Utility tab. You can export as tab-separated, comma-separated, and in .xlsx format.

Here's an excerpt from Help:

"Saving data from a process flow diagram once required you to use the SAS Code node in conjunction with an external SAS library to export your data. Alternately, you can use the operating system to copy the data out of the project directories. The Save Data node combines these methods and enables you to save training, validation, test, score, or transaction data from a node to either a previously defined SAS library or a specified file path. The Save Data node can export JMP, Excel 2010, CSV, and tab-delimited files. The default options are designed so that the node can be deployed in SAS Enterprise Miner batch programs without user input."

I hope this helps.

Ray Wright

EM R&D

View solution in original post


All Replies
SAS Employee
Posts: 122

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Posted in reply to PruthviBhupathiraju

Hi,

I just googled with "export sas data sets to sql server" and got many good leads. This paper should have some template to go directly to SQL server.

http://analytics.ncsu.edu/sesug/2002/DM10.pdf

Jason Xin

Occasional Contributor
Posts: 7

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Thanks a lot Jason

SAS Employee
Posts: 122

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Posted in reply to PruthviBhupathiraju

At SAS BASE Editor, you should have Export /Import at the File menu. That can help you do the CSV, SAS data set ... file conversion. You can point and click to get the job done. There is option to save the code so you can batch-run it elsewhere without engaging the GUI.

Jason Xin

Solution
‎07-06-2017 01:30 PM
SAS Employee
Posts: 106

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Posted in reply to PruthviBhupathiraju

For your first question, check out the Save Data node in the Utility tab. You can export as tab-separated, comma-separated, and in .xlsx format.

Here's an excerpt from Help:

"Saving data from a process flow diagram once required you to use the SAS Code node in conjunction with an external SAS library to export your data. Alternately, you can use the operating system to copy the data out of the project directories. The Save Data node combines these methods and enables you to save training, validation, test, score, or transaction data from a node to either a previously defined SAS library or a specified file path. The Save Data node can export JMP, Excel 2010, CSV, and tab-delimited files. The default options are designed so that the node can be deployed in SAS Enterprise Miner batch programs without user input."

I hope this helps.

Ray Wright

EM R&D

Super Contributor
Posts: 337

Re: How can we export dataset from enterprise Miner as a csv file or text file?

Posted in reply to PruthviBhupathiraju

You can also use proc export in a SAS Code node.

Paste the below on the code editor, or change &EM_EXPORT_TRAIN for the macro variable of the data set that you are interested.

proc export data=&EM_EXPORT_TRAIN

   outfile='c:\myfiles\mymodel.csv'

   dbms=csv

   replace;

run;

🔒 This topic is solved and locked.

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

Discussion stats
  • 5 replies
  • 7422 views
  • 7 likes
  • 4 in conversation