BookmarkSubscribeRSS Feed
SASTad
Fluorite | Level 6


Hello All,

I'm trying to export a large data set to a .CSV format using the export option in SAS EG but it is taking a long time for me to export the data. Is there an alternative method to this?

The data set has 35740724 records.

Thanks.

3 REPLIES 3
SASKiwi
PROC Star

Try PROC EXPORT instead of the EG Export menu option. That will use the SAS server resources which should be a lot faster.

Kurt_Bremser
Super User

Exporting through EG means that the export is done in SAS and the result is transferred to the client where EG runs. Depending on the layout of the .csv, you may simply be limited by the network data transfer rate.

PROC EXPORT will only utilize the workspace server locally and may be much faster on its own; it also shows you the data step it generated in the log, which you can use for further optimization.

Try to reduce the record size of your .csv if possible. You can also compress the .csv (eg with gzip) before using a file transfer tool to put the file where you need it.

Patrick
Opal | Level 21

The EG Export Menu transfers your data from the SAS Server to the EG client and then as much as I know uses client side .net functionality to create a .csv file. The bottleneck is normally the network when transferring the data. So that's a good solution for low volume once-off tasks.

For high volumes or repeated tasks you want to do this .csv file creation programatically on the Server. You can use Proc Export for this or there is also a SAS utility macro %DS2CSV available Base SAS(R) 9.4 Utilities: Reference

Be aware that when executing the task on the server you need to write the output (the .csv) to a location available to the Server (so it can't be your local C: drive).

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1467 views
  • 0 likes
  • 4 in conversation