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.
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
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
Thanks a lot Jason
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
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
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.