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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
rayIII
SAS Employee

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

5 REPLIES 5
JasonXin
SAS Employee

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

JasonXin
SAS Employee

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

rayIII
SAS Employee

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

M_Maldonado
Barite | Level 11

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;

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 choose a machine learning algorithm

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.

Discussion stats
  • 5 replies
  • 17048 views
  • 9 likes
  • 4 in conversation