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.
Try PROC EXPORT instead of the EG Export menu option. That will use the SAS server resources which should be a lot faster.
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.
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).
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: