![]() | ![]() | ![]() | ![]() |
Changing the source data for the Import Data task requires a specific set of steps, and changing the source data for the Query Builder task requires a different set of steps, and, in general, the remaining tasks require a third set of steps for changing the source data. This sample includes four separate examples showing the different steps that are required in order to change source data for different tasks.
When the task is not complex, it might be easier to simply add the new data source to the project and build the task from scratch instead of using the methods outlined in this sample.
These examples were created using SAS Enterprise Guide 4.1.0.521.
These examples require only basic skills creating projects and using tasks such as List Data, Import Data, and the Query Builder in SAS Enterprise Guide.
If your Project windows are different than those in the examples, you can click the View menu, and then select Project Explorer and Project Designer.
The following six data tables are used by the four examples:
Create a backup copy of production projects before making changes.
This example uses CLASS_MALES.sas7bdat and CLASS_FEMALES.sas7bdat. This example starts with a project that contains a List Data task that uses the CLASS_MALES table as the source data. The goal is to keep the same project and task and simply change the source data going into the List Data task.
The following image shows CLASS_MALES as the initial source data for the List Data task.
The following image shows the Properties dialog box:
The following image shows the Insert Data dialog box where CLASS_FEMALES is selected.
The following image shows the Properties dialog box with the updated information.
The following image shows that the HTML results now display CLASS_FEMALES data instead of CLASS_MALES data.
This example uses CLASS_MALES.sas7bdat and CLASS_FEMALES.sas7bdat. This example starts with a project that contains a Query Builder task that uses the CLASS_MALES table as the source data. The goal is to copy the Query Builder task and change the source data going into the new Query Builder task.
The following image shows the source data, which is CLASS_MALES, and a query that filters on AGE and generates an output file named MALES_TEEN.
The following image shows that the data source CLASS_FEMALES has been added to the project.
The following image shows the copied version of the Query Builder task.
The following image shows the Tables and Joins window.
The following image shows the Table Properties dialog box.
The following image shows the Table Properties dialog box with CLASS_FEMALES as the active data.
The following image shows how the copied query now uses CLASS_FEMALES as the source data.
This example uses MALES.csv and FEMALES.csv. This example starts with a project that contains an Import Data task that uses the MALES.csv table as the source data. The goal is to copy the Import Data task and change the source data going into the new Import Data task to FEMALES.csv.
The following image shows the source data file, which is MALES.csv, the Import Data task, and the resulting SAS table, which is SASUSER.MALES.
The following image shows the new Process Flow window with the copied task.
Notice that the source data file was also included.
The following image shows the Properties dialog box.
Notice in the Properties dialog box that the Label still shows the original data source.
The following image shows that the source data file has changed to FEMALES.csv as expected.
The following image shows that the results of the Import Data task are based on the new source data.
If you want the two Import Data tasks in the same Process Flow, then follow these steps:
This example uses MALES.xls and FEMALES.xls. This example starts with a project that contains an Import Data task that uses the MALES.xls table as the source data. The goal is to change the source data going into the Import Data task to FEMALES.xls without copying the task.
The following image shows the source data file, which is MALES.xls, the Import Data task, and the resulting SAS table, which is SASUSER.MALES.
The following image shows the Properties dialog box with the updated source data.
The following image shows that the source data file has changed to FEMALES.xls as expected.
This is the end of the sample.
For a list of available documentation for SAS Enterprise Guide, see http://support.sas.com/documentation/onlinedoc/guide/
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Type: | Sample |
Date Modified: | 2008-05-14 16:51:25 |
Date Created: | 2008-04-15 14:59:49 |
Product Family | Product | Host | Product Release | SAS Release | ||
Starting | Ending | Starting | Ending | |||
SAS System | SAS Enterprise Guide | Microsoft Windows Server 2003 Datacenter Edition | 4.1 | 9.1 TS1M3 SP4 | ||
Microsoft Windows Server 2003 Enterprise Edition | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Standard Edition | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows XP Professional | 4.1 | 9.1 TS1M3 SP4 |