Lab Activity 3: Troubleshooting

In document PowerCenter 9.x Developer, Level 1 (OnDemand) Lab Guide_635845966401197748 (Page 68-84)

Guidelines Scenario:

Now that you have some experience, your Tech Lead has given you a flawed workflow that has errors in need of correction.

Objectives:

 Learn how to copy mappings and workflows from a shared area.

 Identify errors within a mapping and workflow.

 Learn how to use the PowerCenter interfaces and logs to identify errors.

Duration:

25 minutes

Subject Review

The student will copy a workflow from the DEV_SHARED folder and correct the errors associated with it.

Walkthrough:

Start the PowerCenter Repository Manager

1. From within the PowerCenter Designer, please click the PowerCenter Repository Manager icon the toolbar to start it.

2. PowerCenter will log you into the Repository Manager with the Devxx login used to log into the Designer.

a. PowerCenter will automatically open your folder.

Walkthrough:

Copy the Workflow

1. Double-Click the Dev_Shared folder to open it.

a. Expand the Workflows subfolder of the Dev_Shared folder.

i. Select the wf_m_Errors1_xx workflow as shown below.

2. Copy the Workflow

a. Select menu option Edit  Copy.

b. Select your Devxx Folder.

c. Select the menu option Edit  Paste.

d. You will see the following confirmation message:

i. Click Yes.

3. Note the Copy Messages in the Output Window of the Repository Manager.

a. Expand the Sources, Targets, Mappings and Workflows subfolders of your Devxx folder.

i. Transactions should have been added as a Source.

ii. ODS_Transactions should have been added as a Target.

iii. m_Errors1_xx mapping should have been added.

iv. wf_m_Errors1_xx workflow should have been added.

b. Close the Repository Manager

Walkthrough:

Rename the Mapping

1. Navigate back to the PowerCenter Designer.

2. Refresh your folder.

a. Right-Click on your folder and select Disconnect.

b. Right-Click on your folder and select Open.

i. Note that the Error Mapping, Source and Target now exist in your folder.

3. Open the mapping in the Mapping Designer workspace.

a. Select the menu option Mappings  Edit.

b. Rename the mapping so that the xx is your Student id.

c. Click OK.

4. Click Ctrl-S to save your work to the repository.

a. Use the Output window to verify the mapping saved successfully to the repository.

Walkthrough:

Start the Workflow Manager

1. If you are not already logged into the Workflow Manager, launch the application by clicking on the respective icon in the toolbar.

a. Log into the Repository with your Devxx login.

i. Open your folder.

2. Navigate to the Workflow Designer using the Workflow Tools Toolbar.

a. If a workflow exists on the workspace, use menu option Workflows  Close to clear the workspace.

3. Refresh your folder.

a. Right-Click on your folder and select Disconnect.

b. Right-Click on your folder and select Open.

i. Note that the wf_m_errors1_xx workflow is now listed in your folder

Walkthrough:

Rename the Workflow

1. Open the wf_m_errors1_xx workflow in the Workflow Designer workspace.

a. Select the menu option Workflow  Edit.

i. Rename the Workflow so that the xx is your Student ID.

ii. Select the Properties tab and in the Workflow Log File Name attribute, rename the log to match the workflow name.

b. Right-click on the session and select Edit.

i. Rename the session so that the xx reflects your Student ID.

ii. Select the Properties tab and in the Session Log File Name attribute, rename the session log to match the session name.

iii. Click OK.

c. Click Ctrl-S to save your work to the repository.

i. Use the Output window to verify the mapping saved successfully to the repository.

Walkthrough:

Trouble Shoot a Session Failure

1. Right-click on the workspace and Start the Workflow

2. Navigate to the Workflow Monitor a. Note that the workflow failed

 

b. Right-click on s_m_Errors1_xx and select ‘Get Session Log’.

c. Note the message you receive:

3. Right-click on the wf_m_Errors1_xx workflow a. Select Get Workflow Log.

b. Review the Workflow Log

c. Most of the entries are informational; however, take special note of the three error messages toward the end of the log.

i. These errors indicate that your student logon does not have execute permission on the EDW connection object.

d. Close the Workflow Log.

 

Walkthrough:

Correct the Session Failure

After speaking with your team mates and consulting the database, you discover that the target ODS_TRANSACTIONS exists in your ODS database schema.

4. Navigate back to the Workflow Manager.

5. Edit the Session and click on Mapping Tab.

a. Select Connections on the left side of the interface as shown below:

b. The relational connection for the target is EDW. You must change the relational connection for the target to your ODS schema, ODSxx.

i. Select the drop down arrow to the right of the ODS_Transactions Relational target.

ii. The Relational Connection Browser will appear.

iii. Select the ODSxx Connection. Click OK.

 

Your screen should appear similar to the figure shown below:

iv. Click OK.

6. Save the Repository.

7. Start the Workflow and navigate to the Workflow Monitor.

Walkthrough:

Troubleshoot Second Failure

Note the Workflow has failed for a second time.

1. Right-Click on the second run of the s_m_Errors1_xx session a. Select Get Run Properties.

 

The Run Properties screen will appear on the bottom right.

2. The error message indicates that the source file (Transactions.dat) cannot be found on the server machine at C:\infa_shared\SrcFiles.

a. After checking the server, you see a file called sales_transactions.txt.

b. After a conversation with the team, you determine that the source file should indeed be changed to sales_transactions.txt.

c. Navigate back to the Workflow Manager.

i. Edit the session s_m_Errors1_xx.

ii. Click the Mapping Tab. Then select SQ_Transactions in the Sources folder of navigator on the Mapping Tab.

iii. In the Properties Window at the bottom right, note that the value for the Source FileName is Transactions.dat

 

3. Change the Source Filename to sales_transactions.txt as shown in the figure below.

a. Click OK.

b. Save the Repository.

c. Start the Workflow.

 

Walkthrough:

Troubleshoot the Third Failure

Note the Workflow has failed again.

1. Right-click on the session s_m_Errors1_xx in the Workflow Monitor a. Select Get Run Properties.

b. On the right-bottom pane of the screen you should see the following error:

2. Navigate back to the Workflow Manager.

a. Edit the session s_m_Errors1_xx.

b. Click the Mapping Tab.

i. Then select ODS_Transactions in the Targets folder of the navigator window of the Mapping Tab.

ii. In the Properties Window at the bottom right, note that the value for the Target Load Type is Bulk.

 

c. Change the Target Load Type to Normal as shown in the figure below.

d. Click OK.

3. Save the Repository.

4. Start the Workflow

Walkthrough:

Success!!

1. Note that the session has succeeded! Congratulations!

 

In document PowerCenter 9.x Developer, Level 1 (OnDemand) Lab Guide_635845966401197748 (Page 68-84)