Sei sulla pagina 1di 18

Best Practices for using informatica with Teradata Database

By Chakra Sankaraiah
Best Practices for using informatica with Teradata
Database
By Chakra Sankaraiah
(Email id - chakra_sanus!ibm!com "
Page 1 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Document #istory
$ersion Date %uthor Comment %uthori&ation
1.0 12/0/200! Chakra
Sankaraiah
"nitia# document
Table of Contents
1. "ntroduction $
2. Three %ey &u#es $
i) Use Pushdown 3
ii) Using Teradata loaders instead of ODBC connections 7
iii) Use SQ transfor!ation to its fullest 13

Page " of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
'! (ntroduction
Teradata data#ase is one of the leaders a!ong the different data#ases that are a$aila#le
for Data warehousing% &t is a#le to out'erfor! other data#ase #ecause of two !a(or
features) one is 'arallelis! and other is shared nothing architecture% Because of its data
warehousing a#ilities or e*'ertise) Teradata does not co!e chea'% +ach node ,ou #u, is
close to !illion dollars and that for lot of !ediu! si-e co!'anies is a #ig in$est!ent%
.ow if ,ou alread, in$ested hea$il, on ,our data#ase to #e so 'owerful) then ,ou should
tr, to use its ca'a#ilities to its #est%
/, article o$er here is focused on how ,ou can le$erage the in$est!ent that ,ou !ade
in Teradata data#ase in ,our +T tool% & a! going to 'ro$ide so!e #est 'ractices on what
should #e done when ,ou using Teradata with &nfor!atica%
2. Three Key Rules
There are three 0e, rules when ,ou de$elo' infor!atica (o# that is going to interacts
with Teradata data#ase%
i) Use Pushdown
ii) Using Teradata loaders instead of ODBC connections
iii) Use S! transfor"ation to its fullest
Below is e*'lanation to a#o$e 'oints
i) Use Pushdown
#hen to use $
1hen ,ou use Pushdown in infor!atica session) infor!atica wra's the !a''ing logic
into SQ state!ents and fires it at the data#ase% 2ence the logic in ,our infor!atica
!a''ing is not getting 'rocessed using infor!atica ser$er #ut it is getting 'rocessed at
Teradata data#ase ser$er%
Ste's to achie$e 'ushdown in ,our infor!atica (o#
1) Below is an e*a!'le of a infor!atica !a''ing that uses transfor!ation li3e Source
Qualifier) 4oiner) +*'ression transfor!ation and 5ilters%
Page 3 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
This is a t,'ical infor!atica !a''ing where a (oiner is used to co!'are data) e*'ression
is used to a''l, transfor!ation to the data $alues) filter is used to (ust get the !odified
records and finall, the data is getting inserted into the target% This e*ecution of co!'lete
logic can #e !o$ed fro! infor!atica ser$er to Teradata data#ase #, changing session
'ro'erties as #elow
Ste'") Session 'ro'erties for 'ushdown
Page 6 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
There are $arious o'tions a$aila#le under Pushdown #ut & would reco!!end ,ou to use
75ull with 8iew9 as & #elie$e ,ou should use as !uch 'ushdown as 'ossi#le in a session)
if ,ou reall, want to use the data#ase ser$ers rather than infor!atica ser$er%
Ste'3) :ou can loo3 at how the Pushdown SQ loo3s #, selecting /a''ings ta# under
session 'ro'erties and then clic3 on Pushdown O'ti!i-ation
Page ; of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Ste'6) .ow when ,ou select Pushdown O'tion ,ou can see the SQ that infor!atica
generates%
Page < of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
This SQ is then sent to the data#ase and co!'lete e*ecution ha''ens at the data#ase
le$el without 'utting an, load on infor!atica ser$er%
There are $arious o'tions that ,ou select fro! 'ushdown that ,ou can learn fro!
infor!atica hel' 5ile% There are certain infor!atica transfor!ations where ,ou cannot use
'ushdown) which is listed in infor!atica hel' files as well%
ii) Using Teradata loaders instead of ODBC connections
&n case the target is in different ser$er than the source ta#les or in case ,ou ha$e records
that co!e in for u'dates and deletes and not (ust inserts) then ,ou can use &nfor!atica
loaders rather than relation connection for target%
.ow few things to 3ee' in !ind when ,ou do this is =
a) :ou should ha$e TTU >Tereadata tools and utilities) installed in the sa!e ser$er
where infor!atica is installed%
#) :ou should use loader instead of ODBC onl, when ,ou are 'rocessing #igger set
of records% >a''ro*i!atel, !ore than sa, "?)???)
c) :ou need to declare the target transfor!ation 3e,s as 'er the colu!ns that is
uni@ue in target ta#le% This !eans ,ou should !a3e sure that ,our target
definitions has colu!n defined as 3e,s%>Onl, a''lication for /OAD)
Page 7 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
d) :ou should ha$e all the colu!ns !ar3ed as 'ri!ar, 3e, in target definitaion that
are declared as P&s in that target ta#le% >Onl, a''lication for /OAD) #ecause
/OAD u'dates re@uires all P&s to #e there in the BwhereC clause of U'date
state!ent)
Below are the ste's to load target ta#les using oader utilities fro! Teradata
Ste'1) Create loader connection in infor!atica wor3flow !anager%
Ste'") :ou should use 7Teradata warehouse Builder +*tension9 when ,ou create a loader
connection for Teradata
Page 8 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Ste'3) :ou can set the data#ase 'ro'erties and other detail as re@uired% One 3e, thing
when ,ou create a loader connection is) if ,ou want that loader connection for (ust &nsert
or for u'date% &n case for u'date then ,ou are going to use U'date or Strea!%
1hen ,ou use 7oad9 as o'erator then ,ou are using 75ast oad9 utilit, of Teradata)
when ,ou are using 7U'date9 o'erator then ,ou are using 7/OAD9 utilit, of Teradata
and when ,ou use 7Strea!9) ,ou are using 7TPU/P9 utilit, of Teradata% :ou can 3now
!ore a#out each o'erator 'ro'erties fro! infor!atica guide%
Page D of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Ste'6) Once loader connection is a$aila#le ,ou can set target connection as loader #, first
changing the 1riter to 75ile 1riter9 and then change the connection t,'e to 7oader9%
Page 1? of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
O'tional
Once ,ou setu' target connection as oader) infor!atica creates scri'ts #ased u'on the
O'erator ,ou s'ecif,% :ou can !odif, that scri't generated #, infor!atica in case ,ou
want to add or re!o$e an, 'ortion of the scri't%
This ,ou can do onl, at the session le$el) under oader $alue as !ention in the
sna'shot #elow%
Page 11 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Also) ,ou can still use 'ushdown o'ti!i-ation along ,our target loaderE onl, thing is ,our
'ushdown will ha''en (ust till target transfor!ation%
Page 1" of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
iii) Use S! transfor"ation to its fullest
SQ transfor!ation co!es reall, hand, when ,ou are using a 'owerful data#ase li3e
Teradata% :ou can 'erfor! o'eration li3e &n'uts) U'dates and Deletes co!'letel, at
data#ase le$el #, using SQ transfor!ation% But #efore ,ou use SQ transfor!ation ,ou
need to !a3e sure that the records are rightl, flagged for insert) u'date or deletes% The
usual 'ractice is to 'ut the CDC >Change data ca'ture) data into a 1&P>1or3 in 'rogress
ta#le) with a''ro'riate flags >Delete) U'date or &nsert) and then use that 1&P ta#le to
a''l, those D/ o'eration to target ta#le using SQ transfor!ation%
Below are high le$el ste's to use SQ transfor!ation in &nfor!atica%
Ste'1) 5irst :ou need to create a !a''ing that creates a 1&P >wor3 in 'rogress) ta#le%
Creation of this ta#le can #e done using a co!#ination of Pushdown and loaders as
!entioned a#o$e% Since !ost of the 1&P ta#les are truncate and reload the, are 'rett,
fast%

Page 13 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Ste'") Once data is a$aila#le in 1&P ta#le) ,ou can create two se'arate !a''ings) one
for U'dateFDelete and other for &nsert% &ncase when ,ou are using t,'e3 di!ension ta#les)
this a''roach reall, co!es hand, #ecause ,ou can ha$e insert SQ in SQ
transfor!ation where the records are flaged for u'date in 1&P ta#le%
&n #elow sna'shot we ha$e the !a''let and target transfor!ation (ust to ca'ture the
errors% +$en the Source and Source Qualifier transfor!ation are (ust to trigger the
!a''ing%
Page 16 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Page 1; of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Page 1< of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah
Ste'3) in SQ transfor!ation ,ou can !ention the D/ state!ent under the ta# SQ
'ort%
Page 17 of 18
Best Practices for using informatica with Teradata Database
By Chakra Sankaraiah

This a''roach is reall, effecti$e since the co!'lete e*ecution ha''ens at the data#ase
le$el and there is 'racticall, no load on the infor!atica ser$er at all%
A#o$e 3 si!'le a''roaches if i!'le!ented effecti$e will gi$e ,ou a great 'erfor!ance
for an, !a''ing that ,ou create in &nfor!atica for Teradata data#ase% This !aterial is
$er, a#stract) and is (ust !eant to 'oint ,ou to the right direction% &n case ,ou ha$e an,
@uestions a#out an, of the a#o$e a''roaches) 'lease shoot an e!ail to !e at
cha3raGsanHus%i#!%co! and & will tr, to get #ac3 to ,ou as soon as 'ossi#le%
Page 18 of 18

Potrebbero piacerti anche