1. Trang chủ
  2. » Công Nghệ Thông Tin

SAS Data Integration Studio 3.3- P35 pps

5 92 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 544,32 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Example Process Flows 4 Add the Publish to Archive Transformation to the Process Flow 1653 In the Process Designer window, click and drag the target Total_Sales_By_Employee over the inpu

Trang 1

Example Process Flows 4 Add the Publish to Archive Transformation to the Process Flow 165

3 In the Process Designer window, click and drag the target

Total_Sales_By_Employee over the input drop zone for the Publish to

Archivetransformation Release the mouse button to identify the target as the

source for Publish to Archive, as shown in the following display.

Display 10.13 Publish to Archive Transformation at the End of a Process Flow

4 You now have a complete process flow, including a transformation that will

generate an HTML report The next task is to configure the report transformation

so that it will create the desired report

Trang 2

166 Configure the Publish to Archive Transformation 4 Chapter 10

Configure the Publish to Archive Transformation Follow these steps to configure HTML output using the Publish to Archive transformation

1 In the Process Designer window, select the Publish to Archive transformation Then select File I Properties from the menu bar A properties window displays.

2 In the properties window, click the Options tab Type in values for the fields that

are shown in the following display

Display 10.14 Options in the Publish to Archive Transformation

3 Click OK to save input and close the properties window The Publish to Archive

transformation, and the entire job, are now ready to run

Run the Job and Check the Log Same as “Run the Job and Check the Log” on page 162 The next task is to verify that the job created the desired report

Trang 3

Example Process Flows 4 Preparation 167

Check the HTML Report Using the path and file name that you specified in the Publish to Archive transformation, open the HTML report in a browser The report should resemble the following display

Display 10.15 HTML Report Generated by the Example Job

Compare the HTML report to the draft report shown in Display 10.1 on page 150 If changes are needed, change the properties of the Total_Sales_By_Employee table or the transformations in the flow If the report is correct, you can check in the job

Check In the Metadata

To check in all objects in the Project tree:

1 In the Project tree, select the repository icon

2 From the SAS Data Integration Studio menu bar, select Project I Check In Repository All of the objects in the project repository are checked into the

change-managed repository

Example: Creating a Data Validation Job

Preparation Suppose that you wanted to validate the data from a source table before writing it to

a target table SAS Data Integration Studio has several features that can help you to improve the quality of your data, as described in “Working With SAS Data Quality Software” on page 104

This example demonstrates how to use the Data Validation transformation in a job that prepares checking transaction data for loading into a fact table In the example job, the Data Validation transformation writes erroneous rows into an error table Errors are detected based on a comparison of a source column to a column of valid values in a lookup table The transformation also replaces missing values in another source column with a standard text string; any duplicate values that are found in a third source column result in the termination of the job

Trang 4

168 Create and Populate the New Job 4 Chapter 10

Assume that the following preparations have been made

3 The source table contains information on checking account transactions, including status codes and the transaction amount, date, time

Display 10.16 Contents of the Source Table CHECKING_TRANS

3 The lookup table CHECKING_TRANS_LOOKUP contains several columns of valid values that can be used to test incoming source values

3 The error table CHECKING_TRANS_ERROR and the target table CHECKING_TRANS_VALID have the same column definitions (column metadata)

as the source table

3 Metadata for all four tables is available in a current metadata repository

3 The main metadata repository is under change-management control You do not have to check out the metadata for any of the tables used in the current example (The metadata for these tables will not be updated.)

3 You have selected a default SAS application server for SAS Data Integration Studio, as described in “Selecting a Default SAS Application Server” on page 96 This server can access all tables that are used in the job

3 It is assumed that you have started SAS Data Integration Studio and have opened the appropriate metadata profile

Create and Populate the New Job Follow these steps to create and populate the new job:

1 From the SAS Data Integration Studio menu bar, select Tools I Process Designer to display the New Job wizard.

2 Type the job name Validate Checking Transactions, press the TAB key, and the enter the description Cleanses checking account transaction data prior to loading.

3 Click Finish An empty job opens in the Process Designer window The job has

now been created and is ready to be populated

4 From the SAS Data Integration Studio desktop, click the Process Library tab to

display the Process Library

5 In the Process Library, open the Data Transforms folder.

6 Click, hold, and drag the Data Validation transformation into the empty Process

Designer window Release the mouse button to display the transformation in the

Trang 5

Example Process Flows 4 Create and Populate the New Job 169

Process Designer window The Data Validation transformation displays with drop zones for the source and target, as shown in the following display

Display 10.17 The Data Validation Transformation in the New Job

7 From the SAS Data Integration Studio desktop, click the Inventory tab to display

the Inventory tree

8 In the Inventory tree, open the Tables folder.

9 In the Tables folder, click and drag the CHECKING_TRANS table into the source

drop zone in the Process Designer window, then release the mouse button

The table appears as the source in the new job

Ngày đăng: 05/07/2014, 11:20