SAS Enterprise Guide is a versatile tool for everyone from novice analysts to experienced programmers. It has revolutionized the way people use and access SAS (especially new users). With use of Enterprise Guide, it is possible for any newbie to start using capabilities of SAS without spending too much time on training.
During my early days with SAS, Enterprise Guide turned out to be a huge help, using which I could not only accelerate my learning, but also make sure that there is little or no impact on delivery timelines of projects.
Simply put, SAS Enterprise Guide (EG) is a Graphical User Interface (GUI) to access capabilities of SAS. It is a point-and-click, menu- and wizard-driven tool that empowers users to analyze data and publish results. It provides fast-track learning for quick data analysis, generates code for productivity and speeds your ability to deploy analyses and forecasts in real time. EG enables you to preview the code it writes at the back end, thus enabling the user to learn SAS in parallel.
While EG is easy to use and learn, there are basic tips, which can boost your productivity while using it. These tips will ensure that you use EG in efficient and effective manner. So, go ahead and read them:
As mentioned in other articles, it is a good practice to plan and structure your analysis on paper before you actually use the tool. In case of EG, you can take this to next level. Before starting any project, I draw out the expected process flow with great details on paper. This not only helps me structure my thoughts, but also clears up any confusion before starting the work and also helps me sense check the outcome at a later stage.
A typical process flow would look something like this:
As you can see, I even include things like number of rows expected, filter applied, nature of joins etc. The more details you can add at this stage, the easier it becomes to execute.
This is especially important if you are new to EG. I would suggest to continue doing this for first 3 – 6 months at least and then for any big project. Some of the aspects you should consider in this brainstorming are:
- Is this process flow efficient? Are there steps which could be eliminated, combined, broken to make it more efficient.
- Which steps will take the longest time to run? Are there ways to reduce time taken by these steps? Can you join tables in a different order? Can you use an alternate indexed table which has the same information?
- What are the checks you can do after every big step to make sure that the outcome is correct?
While EG makes data manipulations easy, data is stored ineffectively. Use following system option to compress at start of your project and it will be applied to all data sets:
One of the downside of using SAS EG is that it is really bad at giving names to queries (or query builder step) and data sets. If you continue with the names provided by EG, you will not be able to make any sense out of process flow, when you open next.
A valuable addition here is to add names which describe the query or data set better. For example, a query filtering data basis city can be named something like “filter_city_dataset1” rather than the default “query_for_dataset1”. This helps immensely when you open any code at a later date.
As a common situation, we typically import a lot of data from Excel (and Access) because traditionally these tools have been used for data storage and manipulation. One of the best practice is to store the data you want to import as Comma Separated Values (.csv) and then import it in SAS. Doing so, typically takes only fraction of time compared to importing data from Excel or Access native formats.
If you have finished a step which has takes a lot of time to run, you should store the outcome into permanent memory rather than keeping it in WORK.
How does it help?
- In case you lose your connection with the server, you don’t need to run the entire big step again
- If you want to make changes in this project at a later date, you can manipulate only the part in which change is required, rather than running the entire project again.
One of the best ways to keep process flows easy to understand is to divide them in functional process flows and keep them separate. For example, if you are creating a financial model, you can have one process flow for income, one for expenses, one for profit calculation and so on and so forth.
This is simply good house-keeping. Every time you finish a project, make sure you spend some time documenting it. Add a simple note in each process flow including at least following:
- What does the process flow achieve?
- What are the input and output data sets?
- What are the assumptions you have made? Where to make changes in order to change them?
By default, EG opens any data set you bring in the process flow. While this helps you look and explore the data before you write a query, you end up using network and resources (especially for big data sets). If you want to explore any big data set, it is best done on a sample.
To disable automatic opening of data, go to Tools -> Options -> Data and then de-select the option which says “Automatically open data when added to project”. Press OK to save.
These were some tips which I have used and benefited from in my usage of EG. Please feel free to add any more tips you might have used to boost your productivity while using SAS EG.