Call Kettle (PDI) from action sequence (xaction)
Log-in
|
Pentaho Tutorial
:
Simplifying Enterprise Business Intelligence with Pentaho
>
Action sequences
>
Call Kettle (PDI) from action sequence (xaction)
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
Call Kettle (PDI) from action sequence (xaction)
Hide Line numbers
1: 1 Call Kettle (PDI) from action sequence (xaction) 2: 3: #startfloatingbox() 4: *Contents:* \\ 5: #toc("2" "6" "false") 6: #endfloatingbox() 7: 8: The Pentaho BI Server is capable of [Enterprise Information Integration>http://en.wikipedia.org/wiki/Enterprise_Information_Integration] (EII). It contains a [Data Integration>Data Integration] engine, enabling it to run ETL transformations and jobs. You can use an action sequence to call a transformation/job from a KTR/KJB file or PDI repository. 9: 10: Before we start, you should be aware of the version of the PDI engine present in your BI Server. The KTR/KJB files still need to be created in PDI, so compatibility is important. For example, Pentaho 1.6 and 1.7 embed PDI 3.0, and Pentaho 2.0 embeds PDI 3.1. 11: 12: Once you have a working transformation designed in PDI, open the Design Studio to create an action sequence (xaction). 13: 14: # in "Process Actions", click "+" > "Get Data From" > "Pentaho Data Integration" 15: # enter the location of the transformation file (this can be relative, so you don’t need to specify the path if the KTR/KJB file is in the same directory as the xaction) 16: # give the "Transformation Step" in the KTR/KJB to pull data from 17: # define an "Output Name" 18: 19: You might want to pass variables (e.g. prompts answered by the user) from the xaction to the KTR/KJB. 20: 21: 1. define inputs in the "Process Inputs" 22: 1. under "Transformation Inputs" in the "Pentaho Data Integration" process action, add the same inputs (they should be available in the "+" menu) in the order they will be used in the KTR/KJB 23: 1. open the KTR/KJB file in Kettle/PDI 24: 1. add a "Get System Info" step prior to the step that needs the variables (we’ll assume you using "Table Input") 25: 1. in there, add the inputs with a Type of "command line argument 1", "command line argument 2", etc. in order of where they’ll be used 26: 1. in the next step, use a question mark ("?") to refer to each input 27: 1*. inputs are added the the data stream, and so are resolved in the order defined in the "Get System Info" step 28: 1*. if the input is a date, use "date(?)" instead 29: 1. in the "Table Input" step, tick the "Replace variables in script?" box and enter the name of the "Get System Info" step in the "Insert data from step" text box 30: 31: The transformation/job won’t run within Kettle any more as it requires the inputs, but to test you can run it via pan on the command line (add the inputs as arguments). 32: 33: You can of course direct the output to a template created in [Report Designer]. 34: 35: # in "Process Actions", click "+" > "Report" > "Pentaho Report" 36: # use the "Output Name" (defined above) in the "Report Data" field 37: # when creating the template in Report Designer, add an empty default Pentaho Dataset 38: # you will have to manually type in field names, as Report Designer doesn’t know about the queries in Kettle 39: 40: 1.1 Resources 41: 42: * http://forums.pentaho.org/showthread.php?t=61756 43: * http://forums.pentaho.org/showthread.php?t=65411
BizCubed
If you need help with your Pentaho implementation,
click here.
Search
Quick Links
BizCubed Web site
BizCubed Pentaho demo
Wiki Home
Pentaho Tutorial
Blog
What's New
Explanation of symbols and abbreviations
Recently Created
$rdoc.displayTitle
|
Calculate date
|
Calculate date
|
christian
|
christian
Recently Modified
christian
|
Administration Console
|
Administration Console
|
Administration Console
|
Report Designer (Flow)