TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights...
-
Upload
lorraine-barker -
Category
Documents
-
view
251 -
download
10
Transcript of TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights...
![Page 1: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/1.jpg)
TALEND OPEN STUDIO
ADVANCED
Training Material
![Page 2: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/2.jpg)
p2V080424 Copyright © 2008 Talend. All rights reserved
Copyright
Any total or partial reproduction without the consent of the author or beneficiary, devisee or legatee is not allowed (law of 11 March 1957, par. 1 of article 40). Representation or reproduction, by any means, would be considered an infringement of copyright under articles 425 et.seq. of the Penal Code. The law of 11 March 1957, par. 2 and 3 of article 41, allows the creation of copies and reproductions exclusively for the private use of the copier and not for collective use on the one hand while on the other it allows analysts to use short quotes for purposes of illustration.
![Page 3: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/3.jpg)
p3V080424 Copyright © 2008 Talend. All rights reserved
Summary
Reminders and best practices Context management Mastering complex components Error handling Performance monitoring Monitoring and automating management of log files Deployment and scheduling Exploiting the power of programming languages Routines Debugging Creating components
tCiviliteGenerator (no properties view/retrieval of an exercise) tPrintln (properties view) tDecryptRow or tChangeDevise or tAddColumnTotal tPrintOutput to redirect to printer Virtual component (combining tFileInput and tSortRow)
![Page 4: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/4.jpg)
p4
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Reminders and best practices
Reminders Job designs Lookups
Best practices
![Page 5: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/5.jpg)
p5V080424 Copyright © 2008 Talend. All rights reserved
Job Designer: reminders
A Job: components that are linked to one another
Sub-Job
Job
![Page 6: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/6.jpg)
p6V080424 Copyright © 2008 Talend. All rights reserved
Job Designer: tMap and Lookup
Main and Lookup links set the order of processing
CUSTOMER WITH STATES
![Page 7: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/7.jpg)
p7V080424 Copyright © 2008 Talend. All rights reserved
Job Designer: best practices
![Page 8: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/8.jpg)
p8V080424 Copyright © 2008 Talend. All rights reserved
Job Designer: order of components
Order of execution of components
StartingStartingStartingEnd End End
StartingStarting
End End
![Page 9: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/9.jpg)
p9
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Management of Contexts
Reminders The Context node in the Repository
Dedicated components
![Page 10: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/10.jpg)
p10V080424 Copyright © 2008 Talend. All rights reserved
A context contains several types (dev/prod) The prompt functionality refers to different types of
variables (pathDir, pathFile)
Context management
![Page 11: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/11.jpg)
p11V080424 Copyright © 2008 Talend. All rights reserved
Selecting the execution context
When Talend Open Studio starts:
During deployment:
![Page 12: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/12.jpg)
p12V080424 Copyright © 2008 Talend. All rights reserved
Advice
F5: Declare a variable
The component tRunJob
![Page 13: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/13.jpg)
p13V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 1 and 2
![Page 14: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/14.jpg)
p14
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Mastering complex components
Using regular expressions: tFileRegex tIntervalMatch / tDenormalize XML input, validation & XSL Using Webservices
![Page 15: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/15.jpg)
p15V080424 Copyright © 2008 Talend. All rights reserved
Metadata file regexp
An example of reading an Apache log file
![Page 16: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/16.jpg)
p16V080424 Copyright © 2008 Talend. All rights reserved
tFileInputRegexp
Define a regexp, example of reading from Apache log Aug 18 06:31:29 cplemon02.d075.cp logger: 66.102.9.104 - - [18/Aug/2006:07:49:27 +0200] "GET /server-status/ HTTP/1.1" 200 12891 "-" "CactiScript/1.0" "-" localhost Aug 18 06:31:30 cplemon02.d075.cp logger: 66.102.9.104 - - [18/Aug/2006:07:49:28 +0200] "GET /portail/accueil.pl HTTP/1.1" 200 2907 "-" "CactiScript/1.0" "-" localhost Aug 18 06:31:32 cplemon01.d075.cp logger: 66.102.9.104 - - [18/Aug/2006:08:06:48 +0200] "GET /server-status/ HTTP/1.1" 200 56765 "-" "CactiScript/1.0" "-" localhost
![Page 17: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/17.jpg)
p17V080424 Copyright © 2008 Talend. All rights reserved
tIntervalMatch
![Page 18: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/18.jpg)
p18V080424 Copyright © 2008 Talend. All rights reserved
tNormalize
![Page 19: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/19.jpg)
p19V080424 Copyright © 2008 Talend. All rights reserved
tDenormalize
2
3
![Page 20: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/20.jpg)
p20V080424 Copyright © 2008 Talend. All rights reserved
tXSDValidator
![Page 21: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/21.jpg)
p21V080424 Copyright © 2008 Talend. All rights reserved
tXSLT: generate documents
![Page 22: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/22.jpg)
p22V080424 Copyright © 2008 Talend. All rights reserved
tFileOutputXML: 1 special case
![Page 23: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/23.jpg)
p23V080424 Copyright © 2008 Talend. All rights reserved
tAdvancedFileOutputXML
![Page 24: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/24.jpg)
p24V080424 Copyright © 2008 Talend. All rights reserved
tWebServiceInput
![Page 25: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/25.jpg)
p25
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Error management
Trigger ifOk and ifError Components tLogCatcher / tWarn / tDie Create specific logs
![Page 26: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/26.jpg)
p26V080424 Copyright © 2008 Talend. All rights reserved
Error handling
Each component has its own error handling routine (OnComponentError)
![Page 27: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/27.jpg)
p27V080424 Copyright © 2008 Talend. All rights reserved
tLogCatcher schema
Default schema
![Page 28: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/28.jpg)
p28V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 3: Handling errors
![Page 29: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/29.jpg)
p29V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 4: Customizing error logs
![Page 30: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/30.jpg)
p30
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Performance monitoring
tStatCatcher tFlowMeter
![Page 31: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/31.jpg)
p31V080424 Copyright © 2008 Talend. All rights reserved
tStatCatcher
Monitoring the performance of each component
![Page 32: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/32.jpg)
p32
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Monitoring and automation of log file management
Automating the management of logs Using log files
![Page 33: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/33.jpg)
p33V080424 Copyright © 2008 Talend. All rights reserved
Log management
3 types of log
Manual log management and error management
(Java or Perl errors)
Management of component
execution start, end and duration
Management of metrics
![Page 34: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/34.jpg)
p34V080424 Copyright © 2008 Talend. All rights reserved
Management of logs/preferences
In order to collate logs, configure preferences:
![Page 35: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/35.jpg)
p35V080424 Copyright © 2008 Talend. All rights reserved
Management of logs/preferences
In the Properties and Job Designs view, preferences are entered automatically:
This is in Built-in mode, which is not great for maintaining preferences!
It is better to create metadata in the Repository and specify it in each job.
![Page 36: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/36.jpg)
p36V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 5: Creating the tables that are needed
![Page 37: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/37.jpg)
p37V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 6
![Page 38: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/38.jpg)
p38V080424 Copyright © 2008 Talend. All rights reserved
Activity Monitoring Console /PE
Centralize the monitoring of Talend jobs Single user version Harvesting of all execution server reports
Functionalities Monitoring of:
Events triggered by the jobs Execution time Volumes of processed data
Harvest the local and remoteserver data simultaneously
User-definable interface Integrated in Talend Open Studio or independent
Benefits Single console for all integration jobs Custom indicators and thresholds Global view
![Page 39: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/39.jpg)
p39
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Exploiting the power of programming languages
tGroovy, tJava* & tPerl* Create specific classes/subs Use jars/ external Perl modules
![Page 40: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/40.jpg)
p40V080424 Copyright © 2008 Talend. All rights reserved
GroovyFile component
GroovyFile: a simplified syntax
The script is simply entered in a text file
def name='World';
println "Hello $name";
![Page 41: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/41.jpg)
p41V080424 Copyright © 2008 Talend. All rights reserved
Component execution in 3 stages
tPerlFlex/tJavaFlex component
Starting
loop
End
Start
Main
End
Component tPerlFlex/tJavaFlex: a component in 3 parts
![Page 42: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/42.jpg)
p42V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 7
Use tPerlFlex/tJavaFlex to generate the following flow:
key value
0 Miss
1 Mrs.
2 Mr.
![Page 43: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/43.jpg)
p43V080424 Copyright © 2008 Talend. All rights reserved
Start
Main
End
tJava / tPerl = Start section of a tPerlFlex/tJavaFlex
tJava / tPerl components
![Page 44: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/44.jpg)
p44V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 8:
Create a table and use it in tMap
![Page 45: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/45.jpg)
p45V080424 Copyright © 2008 Talend. All rights reserved
Start
Main
End
tJava / tPerl = Main section of a tJavaFlex / tPerlFlex
tJavaRow / tPerlRow components
![Page 46: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/46.jpg)
p46V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 9:
Use a tPerlRow/tJavaRow to modify a flow:
INPUT OUTPUT
0 Miss
1 Mrs.
2 Mr.
![Page 47: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/47.jpg)
p47V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 10: Use tPerlRow/tJavaRow to modify the flow:
INPUT OUTPUT
NSS month yeardepartment
2700392000000 03 1970 92
1760991000000 09 1976 91
![Page 48: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/48.jpg)
p48
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Exploiting the power of programming languages
Master the complex components: tGroovy, tJava & tPerl Create specific classes/subs Use jars/ external Perl modules
![Page 49: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/49.jpg)
p49V080424 Copyright © 2008 Talend. All rights reserved
Editor with embedded Java/Perl
Integrated Java / Perl editor Auto-complete Syntax-based colours Explanation of errors Javadoc / Perldoc
More information about the Java editor
http://jmdoudoux.developpez.com/java/eclipse/?page=Chap_006#L6.4
![Page 50: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/50.jpg)
p50V080424 Copyright © 2008 Talend. All rights reserved
Managing shared code: routines
Structure your classes and subs Group together existing:
Business classes Connectors
![Page 51: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/51.jpg)
p51V080424 Copyright © 2008 Talend. All rights reserved
Creating a class or a sub
Example: Java Class
The comments allow you to make the method available in
Expression Builder and tRowGenerator
![Page 52: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/52.jpg)
p52V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 11: Create that allows the following to be extracted from an NSS:
Month Year Department
INPUT OUTPUT
NSS month year dept
2700392000000 03 1970 92
1760991000000 09 1976 91
![Page 53: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/53.jpg)
p53
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Exploiting the power of programming languages
Mastering complex components: tGroovy, tJava & tPerl Create specific classes/subs Use jars/ external Perl modules
![Page 54: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/54.jpg)
p54V080424 Copyright © 2008 Talend. All rights reserved
Use a jar file or an external module
The external jar files are declared in a routine
![Page 55: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/55.jpg)
p55V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 12: Import the jakarta-oro-2.0.8.jar package Create a routine isValideEmail()
public static boolean isValideEmail(String email) { Perl5Matcher matcher = new Perl5Matcher(); Perl5Compiler compiler = new Perl5Compiler(); Pattern pattern; try { pattern = compiler.compile("^[\\w_.-]+@[\\w_.-]+\\.[\\w]+$"); if (!matcher.matches(email, pattern)) { return false; } } catch (MalformedPatternException e) { throw new RuntimeException(e); } return true; }
![Page 56: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/56.jpg)
p56V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 13: Create a job and name it UseJar Use the function IsValideEmail()
![Page 57: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/57.jpg)
p57
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Implementing jobs
Advanced debugging mode Define Breakpoints Learn step-by-step mode (step in, step into, step over) View variables in real time “Hot fix” variables in memory
![Page 58: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/58.jpg)
p58V080424 Copyright © 2008 Talend. All rights reserved
Debug view
"Step-by-step" mode Hot fix variables
JasperETL
On-line resources
http://www.jmdoudoux.fr/java/dejae/chap008.htm
![Page 59: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/59.jpg)
p59V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 14: Using the debugger
![Page 60: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/60.jpg)
p60
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Implementing jobs
Deploy your jobs to a production system Export your jobs
Executable Web services
Launch your jobs from the command line Plan execution of your jobs via a scheduler
![Page 61: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/61.jpg)
p61V080424 Copyright © 2008 Talend. All rights reserved
Deployment and optimisation
Deploy jobs Retrieve the generated code Conditions under which they function
![Page 62: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/62.jpg)
p62V080424 Copyright © 2008 Talend. All rights reserved
Deploy a web service
![Page 63: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/63.jpg)
p63V080424 Copyright © 2008 Talend. All rights reserved
Talend products and deployment
Talend Integration Suite
• Shares Repository• Job Conductor• Activity Monitoring Console / Dashboard• Distant Run• Grid Conductor• CPU Balancer
Talend on Demand
• Hosted Repository
Su
bs
criptio
n
GP
L
Op
en S
ou
rce
En
terprise
Ind
ividu
al
Activity Monitoring Console/Personal Edition
Talend Open Studio
• Business Modeler• Job Designer• Metadata Manager
Deploy your jobs remotelyDeploy your jobs remotely
![Page 64: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/64.jpg)
p64
Let's carry on!
V080424 Copyright © 2008 Talend. All rights reserved
Implementing jobs
Create your own components: design and implementation Understand the concepts of code generation via a template Understand the 3 template files: start/main/end Understand the XML description of components Internationalize your components
![Page 65: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/65.jpg)
p65V080424 Copyright © 2008 Talend. All rights reserved
Architecture of Talend Open Studio
Talend Open Studio
Business
Model
XML
Job
XML ...
Perl
Jet Template
Java
Jet Template
C
Jet Template
Perl Program
Java Program
C Program
Storage
CodeGenerator
GeneratedProgram
GUI
Pre
lim
inar
y sk
ills
: JA
VA
1.5
Pre
lim
inar
y sk
ills
: P
erl
5.8
![Page 66: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/66.jpg)
p66V080424 Copyright © 2008 Talend. All rights reserved
Execution of components
Order in which components are executed
StartingStartingStartingEnd End End
StartingStarting
End End
![Page 67: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/67.jpg)
p67V080424 Copyright © 2008 Talend. All rights reserved
Design a specific component
tJavaFlex / tPerlFlex : Start: action triggered by calling the component Main: action triggered with each line of data End: action triggered at the end of processing
![Page 68: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/68.jpg)
p68V080424 Copyright © 2008 Talend. All rights reserved
Module containing components
The module org.talend.designer.components.localprovider
Do not modify this file by hand!
![Page 69: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/69.jpg)
p69V080424 Copyright © 2008 Talend. All rights reserved
User components
Store your components in a specific file
![Page 70: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/70.jpg)
p70V080424 Copyright © 2008 Talend. All rights reserved
Component’s Designer
Your components currently in development
![Page 71: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/71.jpg)
p71V080424 Copyright © 2008 Talend. All rights reserved
Best practices
Differentiate between your development and production environments!
Install an instance of TOS to develop your components
Install an instance of TOS or of TIS Client to manage your Talend projects
Simply separating the storage folders for production and development components is not sufficient.
![Page 72: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/72.jpg)
p72V080424 Copyright © 2008 Talend. All rights reserved
Component files
<component>_<language>.xml Description of a component
<component>_icon32.png The Palette icon
<component>_messages.properties The contents of the properties view
<component>_begin.<language>jet The Start part of the code
<component>_main.<language>jet The Main part of the code (the loop)
<component>_end.<language>jet The End part of the code
![Page 73: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/73.jpg)
p73V080424 Copyright © 2008 Talend. All rights reserved
Working with files
The Component Designer view
![Page 74: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/74.jpg)
p74V080424 Copyright © 2008 Talend. All rights reserved
<component>_<language>.xml
<component>_<language>.xml, description of component The Header tag presents the attributes
AUTHOR, VERSION, COMPATIBILITY STARTABLE SCHEMA_AUTO_PROPAGATE DATA_AUTO_PROPAGATE
The CONNECTORS tag contains: <CONNECTOR CTYPE="FLOW" MAX_INPUT="0"/> <CONNECTOR CTYPE="ITERATE"
MAX_OUTPUT="1" MAX_INPUT="1"/> <CONNECTOR CTYPE="THEN_RUN" MAX_INPUT="1"/> <CONNECTOR CTYPE="RUN_OK"/> <CONNECTOR CTYPE="RUN_ERROR"/> <CONNECTOR CTYPE="RUN_IF"/> <CONNECTOR NAME="UNIQUE" CTYPE="FLOW"
COLOR="086438" BASE_SCHEMA="FLOW" /> <CONNECTOR NAME="DUPLICATE" CTYPE="FLOW"
LINE_STYLE="2" COLOR="f36300" BASE_SCHEMA="FLOW" /> PARAMETERS...following page ;)
http://www.talendforge.org/wiki/doku.php?id=component_creation#xml_description
![Page 75: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/75.jpg)
p75V080424 Copyright © 2008 Talend. All rights reserved
<component>_<language>.xml
<component>_<language>.xml, description of component: parameters
<PARAMETER NAME="FILENAME" FIELD="FILE" NUM_ROW="2" REQUIRED="true" >
<DEFAULT>'C:\talend_files\in.csv'</DEFAULT> </PARAMETER>
http://www.talendforge.org/wiki/doku.php?id=component_creation#xml_description
•CHECK•CLOSED_LIST•DIRECTORY•FILE•MEMO•MEMO_PERL
•MEMO_JAVA•MEMO_SQL•PROCESS_TYPE•PROPERTY_TYPE•SCHEMA_TYPE•TABLE•TEXT
The different forms of FIELD
![Page 76: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/76.jpg)
p76V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 15: First component! Objective is to understand the description xml file
![Page 77: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/77.jpg)
p77V080424 Copyright © 2008 Talend. All rights reserved
Internationalize these components
CompoName_messages_zh.properties
![Page 78: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/78.jpg)
p78V080424 Copyright © 2008 Talend. All rights reserved
JET Templates
Eclipse Modeling Framework (EMF) contains a very powerful tool for generating source code: JET (Java Emitter Templates)
![Page 79: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/79.jpg)
p79V080424 Copyright © 2008 Talend. All rights reserved
JET Templates: general information
JET Template is made up of several parts: The code to be generated The functional code allowing you to determine the
parameters of the code to be generated
<%
/*Java code which will not be included in the generated code
otherwise called the functional code
*/
%>
/* Jave Code constituting the generated code*/
![Page 80: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/80.jpg)
p80V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 16: First JET Templates!
![Page 81: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/81.jpg)
p81V080424 Copyright © 2008 Talend. All rights reserved
JET Templates / Start :: imports
JET Templates header
Then provides information according to the functionality of components
<%@ jet imports="
org.talend.core.model.process.INode org.talend.core.model.process.ElementParameterParser org.talend.core.model.metadata.IMetadataTable org.talend.core.model.metadata.IMetadataColumn org.talend.designer.codegen.config.CodeGeneratorArgument java.util.List
"
%>
![Page 82: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/82.jpg)
p82V080424 Copyright © 2008 Talend. All rights reserved
JET Templates / tPrint
The tPrint component:
<%@ jet imports="
org.talend.core.model.process.INode org.talend.core.model.process.ElementParameterParserorg.talend.designer.codegen.config.CodeGeneratorArgument
"%><% CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String msg = ElementParameterParser.getValue(node, "__COMMENTAIRE__");%> String msg = <%=msg %>; if(msg.equals("")) { System.out.println("Message is empty"); } else { System.out.println(msg); }
![Page 83: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/83.jpg)
p83V080424 Copyright © 2008 Talend. All rights reserved
JET Templates/tPrint/generated code
Generated code
String msg = "nbrLignes: " + ((Integer)globalMap.get("tLogRow_1_NB_LINE")) ;
if(msg.equals("")) { System.out.println("Message is empty"); } else { System.out.println(msg); }
![Page 84: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/84.jpg)
p84V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 17: Create the component tPrint A single parameter: Comments
Use it in a job!
![Page 85: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/85.jpg)
p85V080424 Copyright © 2008 Talend. All rights reserved
JET Templates/error management
Native handling: when a Java exception occurs The OnError link is triggered instead of the OnOk link The variable compoName_ERROR_MESSAGE is instantiated The error message is sent to tLogCatcher
Manual handling: compoName_ERROR_MESSAGE must be instantiated throw new Exception("myErrorMessage"); System.err.println("myErrorMessage");
![Page 86: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/86.jpg)
p86V080424 Copyright © 2008 Talend. All rights reserved
JET Templates / tPrint
Handling an error in the tPrint component:
<%@ jet imports="
org.talend.core.model.process.INode org.talend.core.model.process.ElementParameterParserorg.talend.designer.codegen.config.CodeGeneratorArgument
"%><% CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String msg = ElementParameterParser.getValue(node, "__MSG2PRINT__");
String cid = node.getUniqueName(); %>String msg = <%=msg %>; if(msg.equals("")) { String errMsg = "<%=cid %>: message is empty"; globalMap.put("<%=cid %>_ERROR_MESSAGE", errMsg); System.err.println(errMsg); throw new Exception(errMsg); } else { System.out.println(msg); }
![Page 87: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/87.jpg)
p87V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 18: Manage errors from within a component Create the component tPrint Display an alert in the case of an empty message Trigger the OnError link
![Page 88: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/88.jpg)
p88V080424 Copyright © 2008 Talend. All rights reserved
JET Templates
Eclipse Modeling Framework (EMF) contains a very powerful tool for generating source code: JET (Java Emitter Templates)
In Talend, the JET Templates are split into 3 parts:
Start
Main
End
![Page 89: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/89.jpg)
p89V080424 Copyright © 2008 Talend. All rights reserved
tInputCivilite
![Page 90: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/90.jpg)
p90V080424 Copyright © 2008 Talend. All rights reserved
Define a schema by default
<PARAMETERS> <PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true" NUM_ROW="1" READONLY="true"> <TABLE> <COLUMN NAME="id" TYPE="id_Integer" LENGTH="1"/> <COLUMN NAME="value" TYPE="id_String" LENGTH="30"/> </TABLE> </PARAMETER> </PARAMETERS>
<PARAMETERS> <PARAMETER NAME="SCHEMA" FIELD="SCHEMA_TYPE" REQUIRED="true" NUM_ROW="1" READONLY="true"> <TABLE> <COLUMN NAME="id" TYPE="id_Integer" LENGTH="1"/> <COLUMN NAME="value" TYPE="id_String" LENGTH="30"/> </TABLE> </PARAMETER> </PARAMETERS>
![Page 91: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/91.jpg)
p91V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 19: Create the tInputCivilite (or tInputtitle) component Configure the xml file and properties Create the 3 JET Templates
![Page 92: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/92.jpg)
p92V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 20: Manipulate multiple flows Modify the xml file in order to allow multiple outputs Modify the main Jet Template
![Page 93: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/93.jpg)
p93V080424 Copyright © 2008 Talend. All rights reserved
Mode Row: Propagation of the schema
Let's pass to the Row components
![Page 94: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/94.jpg)
p94V080424 Copyright © 2008 Talend. All rights reserved
Propagation of the schema/ the code
![Page 95: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/95.jpg)
p95V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 21: Create a tDemoRow component
![Page 96: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/96.jpg)
p96V080424 Copyright © 2008 Talend. All rights reserved
tInt2StringCiviliteRow
![Page 97: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/97.jpg)
p97V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 22: Produce the tInt2StringCivilite component Begin: initialize the String [] valueArray table Main: loop on the columns and determine the content of the
column __CIVILITEOUT__
![Page 98: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/98.jpg)
p98V080424 Copyright © 2008 Talend. All rights reserved
tReplaceCiviliteRow
<PARAMETERS> <PARAMETER NAME="CIVILITEOUT" FIELD="TEXT" REQUIRED="true" NUM_ROW="1" NB_LINES="1"> <DEFAULT>"newColumn"</DEFAULT> </PARAMETER> </PARAMETERS>
<PARAMETERS> <PARAMETER NAME="CIVILITEOUT" FIELD="TEXT" REQUIRED="true" NUM_ROW="1" NB_LINES="1"> <DEFAULT>"newColumn"</DEFAULT> </PARAMETER> </PARAMETERS>
![Page 99: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/99.jpg)
p99V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 23: Produce the tRowCivility component
![Page 100: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/100.jpg)
p100V080424 Copyright © 2008 Talend. All rights reserved
Reject
Case where the key is superior to 2
![Page 101: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/101.jpg)
p101V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 24: Manage a reject flow
![Page 102: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/102.jpg)
p102V080424 Copyright © 2008 Talend. All rights reserved
Load a jar into a component
![Page 103: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/103.jpg)
p103V080424 Copyright © 2008 Talend. All rights reserved
Practice area
Exercise 25: Import a Jar into a component
![Page 104: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/104.jpg)
p104V080424 Copyright © 2008 Talend. All rights reserved
Improve the created components
The Java editor allows you to identify unused imports
![Page 105: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/105.jpg)
p105V080424 Copyright © 2008 Talend. All rights reserved
Virtual component
Certain components can use other components in a transparent manner
<CODEGENERATION> <TEMPLATES INPUT="AGGOUT" OUTPUT="AI"> <TEMPLATE NAME="AGGOUT" COMPONENT="tAggregateOut"> <LINK_TO NAME="AI" CTYPE="THEN_RUN"/> </TEMPLATE> <TEMPLATE NAME="AI" COMPONENT="tArrayIn"/> <TEMPLATE_PARAM SOURCE="self.OPERATIONS"
<TEMPLATE_PARAM SOURCE="self.OPERATIONS" <TEMPLATE_PARAM SOURCE="self.GROUPBYS"
TARGET="AGGOUT.GROUPBYS"/> <TEMPLATE_PARAM SOURCE="self.SCHEMA"
TARGET="AGGOUT.SCHEMA"/> <TEMPLATE_PARAM SOURCE="self.SCHEMA "
TARGET="AI.SCHEMA"/> <TEMPLATE_PARAM SOURCE="self.UNIQUE_NAME"
TARGET="AGGOUT.DESTINATION"/> <TEMPLATE_PARAM SOURCE="self.UNIQUE_NAME "
TARGET="AI.ORIGIN" /> </TEMPLATES> </CODEGENERATION>
![Page 106: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/106.jpg)
p106V080424 Copyright © 2008 Talend. All rights reserved
Component and graphic interface
The use of the graphic user interface by a component requires the creation of a dedicated plugin
![Page 107: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/107.jpg)
p107V080424 Copyright © 2008 Talend. All rights reserved
Rely on the Talend community
Your tools: Wiki BugTracker
Exchange with the community: Forum Ecosystem
![Page 108: TALEND OPEN STUDIO ADVANCED Training Material. p2 V080424 Copyright © 2008 Talend. All rights reserved Copyright Any total or partial reproduction without.](https://reader036.fdocuments.us/reader036/viewer/2022081418/56649d6e5503460f94a4fc9e/html5/thumbnails/108.jpg)
p108
Congratulations!
V080424 Copyright © 2008 Talend. All rights reserved
Contact : [email protected]
Your turn to play!