Desktop productivity for business analysts and programmers

Export Data in EG

Reply
Occasional Contributor
Posts: 16

Export Data in EG


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.

Super User
Posts: 3,238

Re: Export Data in EG

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

Super User
Posts: 7,450

Re: Export Data in EG

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Respected Advisor
Posts: 4,137

Re: Export Data in EG

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).

Ask a Question
Discussion stats
  • 3 replies
  • 406 views
  • 0 likes
  • 4 in conversation