Escolar Documentos
Profissional Documentos
Cultura Documentos
MyDatastageNotes:JoinStage
0
More NextBlog
CreateBlog SignIn
MyDatastageNotes
Pages
JoinStage
Home
DifferentVersions
AllDatastageStages
ConfigurationFile
Sequentional_Stage
Dataset
TransformerStage
MULTIPLEJOINSTAGESTOJOINTHREETABLES
Ifwehavethreetablestojoinandwedon'thavesamekeycolumninallthetablesto
jointhetablesusingonejoinstage.
InthiscasewecanuseMultiplejoinstagestojointhetables.
SortStage
Aggregator_Stage
Youcantakesampledataasbelow
JoinStage
Lookup_Stage
Merge_Stage
Filter_Stage
CopyStage
Funnel_Stage
ColumnGenerator
soft_com_1
e_id,e_name,e_job,dept_no
001,james,developer,10
002,merlin,tester,20
003,jonathan,developer,10
004,morgan,tester,20
005,mary,tester,20
Surrogate_Key_Stage
SCD
Pivot_Enterprise_Stage
Sequence_Activities
DatastageStudyMaterial/Interview
Questions
DatastageErrorsandResolution
DatastageScenariosandsolutions
UnixShellScripting
SQL/Database
DatawarehousingConcepts
BlogArchive
soft_com_2
dept_no,d_name,loc_id
10,developer,200
20,tester,300
soft_com_3
loc_id,add_1,add_2
10,melbourne,victoria
20,brisbane,queensland
TakeJobDesignasbelow
2014(46)
September(40)
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
1/7
10/1/2014
MyDatastageNotes:JoinStage
Starschemavs.snowflakeschema:
Whichisbetter?...
HowtouseAggregatestagetocount
numberofreco...
ColumnExportStage:
ETLJobDesignStandards
Scenario:Getthemaxsalaryfrom
datafile(Seq...
PeekStage
Readandloadthedatainthreesequentialfiles.
Scenario:TogettheUniqueand
Duplicatesvalues...
InfirstJoinstage,
Scenario:Getthenextcolumnvalue
incurrentrow...
GotoPropertiesSelectKeycolumnasDeptno
DummyDataGenerationusingRow
Generator
andyoucanselectJointype=Inner
ConductorNodeinDatastage
SequentialFileBestPerformance
Settings/Tips
Splittinginputfilesintothreedifferent
filesu...
SequentialfilewithDuplicateRecords
Scenarios_Unix
DraganddroptherequiredcolumnsinOutput
ClickOk
InSecondJoinStage
GotoPropertiesSelectKeycolumnasloc_id
Unix_AWK
Unix_SED
Unix_Cut
andyoucanselectJointype=Inner
DragandDroptherequiredcolumnsintheoutput
UNIXEnvironmentalVariables
OtherusefulUNIXcommands
UnixFilesystemsecurity
UnixWildcards
UnixRedirection
UnixSearchingthecontentsofafile
UnixDisplayingthecontentsofafile
onthescre...
Clickok
GivefilenametotheTargetfile,That'sit
CompileandRuntheJob
YoucanLearnmoreonJoinStagewithexamplehere
UnixRemovingFiles
UnixMove
UnixCopy
UnixPathnamesListingDirectories
JOINSTAGEWITHOUTCOMMONKEYCOLUMN
UnixMakingDirectories
UnixIntroduction
IfweliketojointhetablesusingJoinstage,weneedtohavecommonkey
RIGHTANDLEFTFUNCTIONSIN
TRANSFORMERSTAGEWITH...
columnsinthosetables.Butsometimeswegetthedatawithoutcommonkeycolumn.
FIELDFUNCTIONINTRANSFORMER
STAGEWITHEXAMPLE
Inthatcasewecanusecolumngeneratortocreatecommoncolumninboththe
SORTSTAGEANDTRANSFORMER
tables.
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
2/7
10/1/2014
MyDatastageNotes:JoinStage
STAGEWITHSAMPLEDATA...
HOWTOCONVERTROWSINTOTHE
COLUMNSINDATASTAGE
ReadandloadthedatainSeq.Files
TRANSFORMERSTAGEFOR
DEPARTMENTWISEDATA
GotoColumnGeneratortocreatecolumnandsampledata.
FindTotal_ScoreandPercentage
usingTransformer...
Inpropertiesselectnametocreate.
FIELDFUNCTIONINTRANSFORMER
STAGE
andDragandDropthecolumnsintothetarget
CONCATENATEDATAUSING
TRANSFORMERSTAGE
NowGototheJoinStageandselectKeycolumnwhichwehavecreated(Youcangive
TRANSFORMERSTAGEUSING
PADSTRINGFUNCTION
anyname,basedonbusinessrequirementyoucangiveunderstandablename)
TRANSFORMERSTAGEUSING
STRIPWHITESPACESFUNCTION
InOutputDragandDropallrequiredcolumns
May(4)
GiveFilenametoTargetFile.Than
February(2)
CompileandRuntheJob.
2013(39)
SampleTablesYoucantakeasbelow
Table1
e_id,e_name,e_loc
100,andi,chicago
200,borny,Indiana
300,Tommy,NewYork
Table2
Bizno,Job
20,clerk
30,salesman
INNERJOININJOINSTAGEWITHEXAMPLE
IfwehaveaSourcedataasbelow
xyz1(Table1)
e_id,e_name,e_add
1,tim,la
2,sam,wsn
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
3/7
10/1/2014
MyDatastageNotes:JoinStage
3,kim,mex
4,lin,ind
5,elina,chc
xyz2(Table2)
e_id,address
1,losangeles
2,washington
3,mexico
4,indiana
5,chicago
Weneedtheoutputasa
e_id,e_name,address
1,tim,losangeles
2,sam,washington
3,kim,meixico
4,lin,indiana
5,elina,chicago
Takejobdesignasbelow
ReadandLoadtheboththesourctablesinseq.files
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
4/7
10/1/2014
MyDatastageNotes:JoinStage
AndgotoJoinstageproperties
SelectKeycolumnase_id
JOINType=Inner
InOutputColumnDragandDropRequiredColumnstogotooutputfileandclickok.
GivefilenameforTargetdatasetandthen
CompileandRuntheJob.YouwillgettheRequiredOutputintheTargetFile.
Joinstagesanditstypesexplained:
InnerJoin:
Sayifwehaveduplicatesinlefttableonkeyfield?Whatwillhappen?
Weallgetallmatchingrecords.WewillgetallmatchingDuplicatesallwellhereisthe
tableRepresentationofjoin.
LeftOuterJoin:
Alltherecordsfromlefttableandallmatchingrecords.Ifwedontexistsintherighttableitwillbe
populatedwithnulls.
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
5/7
10/1/2014
MyDatastageNotes:JoinStage
RightOuterJoin:
Alltherecordsfromrighttableandallmatchingrecords.
FullOuterJoin:
Allrecordsandallmatchingrecords:
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
6/7
10/1/2014
MyDatastageNotes:JoinStage
DifferenceBetweenlookup/join/merge
Nocomments:
PostaComment
Home
Subscribeto:Posts(Atom)
Manohar.Simpletemplate.PoweredbyBlogger.
http://mydatastagenotes.blogspot.in/p/multiplejoinstagestojointhree.html
7/7