Saturday, May 10, 2014

DataStage Scenario on Finding Unique Distance from Source and Destination

Posted by Venkat ♥ Duvvuri 2:46 AM, under | 1 comment

Source,Destination,Distance
hyd,bang,1000
delhi,chennai,1500
chennai,bang,600
bang,hyd,1000
bombay,pune,1000
bang,chennai,600

**Sorted on Distance**

Source,Destination,Distance
bang,chennai,600
chennai,bang,600
bang,hyd,1000
bombay,pune,1000
hyd,bang,1000
delhi,chennai,1500

**Stg Variables**
PrevActualStr: ActualStr
ActualStr: inp.Src:inp.Dest
RevStr: inp.Dest:inp.Src
isDup: if PrevActualStr = RevStr then 1 else 0

**Constraint**
isDup = 0 [Constraint]

The below steps will explain you, How the records will be processed to o/p based on the above criteria.

Rec-1:

PrevActualStr: Garbage value
ActualStr: bangchennai
RevStr: chennaibang
isDup: 0 [if PrevActualStr = RevStr then 1 else 0]

isDup = 0 [Rec will be processed to o/p as per our constraint isDup=0]

O/P
Src Dest Distance
bang chennai 600


Rec-2:

PrevActualStr: bangchennai
ActualStr: chennaibang
RevStr: bangchennai
isDup: 1 [if PrevActualStr = RevStr then 1 else 0]

isDup = 1 [Rec willn't be processed to o/p as our constraint isDup=0]

O/P
Src Dest Distance
bang chennai 600

Rec-3

PrevActualStr: chennaibang
ActualStr: banghyd
RevStr: hydbang
isDup: 0 [if PrevActualStr = RevStr then 1 else 0]

isDup = 0

O/P
Src Dest Distance
bang chennai 600
bang hyd 1000
---------------------
====================

Sunday, July 7, 2013

Performance Optimization technique to handle variable length data in Data Set

Posted by Venkat ♥ Duvvuri 4:02 PM, under | 4 comments

Thursday, February 14, 2013

How to replace a string in DataStage

Posted by Venkat ♥ Duvvuri 11:55 AM, under | 7 comments


I have seen several web sites which are explaining most of the things on DataStage, but I have not seen easiest way to replace a string by using DataStage functionality without using Ereplace Function.

Field Name: SERVICE

Requirement: If the service description contains the word "Functional", then replace the word with "Technical".

Source Service Desc: My Functional Service for you...!!!

Expected Target Service Desc: My Technical Service for you...!!!


Logic to get the output as per the specified requirement;

Saturday, January 14, 2012

New features and changes for IBM InfoSphere Information Server, Version 8.7

Posted by Venkat ♥ Duvvuri 11:09 PM, under | 6 comments

New features and changes were introduced for IBM® InfoSphere® Information Server, Version 8.7 along with documentation updates. The new and changed features and documentation updates are described in the following sections.

Table of contents

InfoSphere Information Server, Version 8.7, new features and changes: