IBM DataStage 8.5 Beginner's Guide - Lab#09 RouterTransformation
IBM DataStage 8.5 Beginner's Guide - Lab#09 RouterTransformation
Description:
BISP is committed to provide BEST learning material to the
beginners and advance learners. In the same series, we have
prepared a list of beginner’s guide and FAQs for IBM Data Stage.
We have built complete financial Data Model and various data
transformation techniques. Download many such learning
documents, student guide, Lab Guide and Hands-on practice
materials. This document describes in step by step manner how
to apply filter condition. Here we want conditional load data into
Oracle and SQL Server from flat files based on Definition
language field. Data loads into SQL Server if Language is "US"
Otherwise it goes to Oracle. Join our professional training to
learn from Experts.
Router Transformation:-
In this documents we use Filter stage for performing Router Transformation, we
take input from flat file and output goes to RDBMS based on definition language,
those user who belongs to US goes to SQL SERVER and other users goes to Oracle.
Step-3 :- First go on File Palette then scroll the cursor and choose Sequential File
and drag it to Parallel pane and rename it. This file is used for input data.
Step-5 :- Choose filter from processing palette and drag it to parallel pane. Filter is
used is for filtering values from flat file and put into target where we want to store
are data.
Step-7 : Now first before loading data into output,we have to create a table in sql
server or oracle. So, we write a create table command and make sure to give same
column name as you have in flat file. Go to SQL tab than write query and remember
the username and password.
Step-9:- Go to Format tab and Remove double Quote because we don't need them
then Click on OK.
Note:- If you use date as a input than specify here which type of format you used
Step-11:- Now click on View Data and Ok. If your data is shown like this that means
you have made successful connection between input file and DataStage otherwise it
will give some error like column mismatch error.
Step-15:- Now see here we want to save rejected data that's why we select true
then rejected values goes to oracle enterprise stage.
Step-17:- Click on Input and see all columns are available or not
Step-19:- Now when we choose rejected link then see we can't put any column
here all rejected data automatically goes on it. and click on OK
Step-21:- Click on column tab and see all the columns are showing or not.
Step-23 :- Now double click on Oracle enterprise stage then it looks like it and we
have to enter our table name here in which table we want to insert our data and
Step-24:- There's one more option here once you click on connection tab then
remote server options are popup then we have to specify our server name of oracle.
Step-26:- Now there are two ways to load data, directly load or user define
load.We choose user define that's why we choose upsert.
Step-28:- We only want to update our data by insert data in table ,so we copied
the insert query and put in this and because we only want to update so we have
choosen update only method.
Step-30:- Click on column tab and see all the columns are showing or not.
Step-31:- Now compiling the job and notice which file is rejected file.
Step-33:- Now click on Run tab and notice some options available here. We have
selected No limit of warnings and we can validate before run the job.
Step-35:- Now Go to SQL Console and connect with the same login credentials as I
mentioned in oracle enterprise stage src_creditcard/password so you can choose
Step-36:- Now Go to SQL Console and connect with the same login credentials as I
mentioned in Sql server enterprise stage sa/password123 so you can choose your
own username and password. Before loading, remember to check structure of this
file is available and then you should be able to load the data. then simple query:
<SELECT * FROM SRC_ACCOUNT_OFFICER_CD;>