The initial release of ODI 11g introduced the ability to develop objects, such as Models, Interfaces, and Packages, using the Java-based ODI SDK. Groovy scripting capabilities from within ODI Studio were delivered with a later release, simplifying the development process. Several practical examples will be demonstrated, such as adding columns to Datastores, creating Interfaces and Load Plans, and a full migration of ETL code into ODI Interfaces, all using the ODI SDK and Groovy. These use-cases will display the power of the ODI SDK and how it can be applied in real-world situations.
Presented at Rittman Mead BI Forum 2013 Masterclass.
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā
Scripting and Automating ODI 11g using Groovy and the ODI SDK
1. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Scripting and Automating ODI 11g using Groovy and the ODI SDK
Michael Rainey, Principal Consultant, Rittman Mead
Rittman Mead BI Forum 2013 Master Class, May 2013
2. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
ā¢Introduction to the ODI SDK
ā¢Introduction to Groovy scripting language
ā¢Demonstrations
ā£Developerās Quickstart
ā£Metadata Setup
ā£Initial Load: Interfaces, Scenarios, and Load Plans
ā£ETL Migration to ODI
About this presentation...
3. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Intro to the ODI SDK
ā¢Java based API
ā£Develop using Java, Jython, or Groovy
ā¢Perform nearly every action that can be done in ODI Studio
ā£Generate metadata
ā£Create / Modify Interfaces, Packages, Load Plans, etc
ā£Manage execution sessions
ā¢Resources
ā£Data Integration blog
https://blogs.oracle.com/dataintegration/tags/sdk
ā£Rittman Mead blog
http://www.rittmanmead.com/tag/odi-11g-sdk/
ā£Oracle Data Integrator Java API Reference
http://docs.oracle.com/cd/E28280_01/apirefs.1111/e17060/index.html
4. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Intro to Groovy
ā¢Agile, dynamic object oriented programming language for the Java Virtual Machine
ā¢Like Java...but simplified
ā£Most Java syntax is valid in Groovy
ā£Additional features inspired by Python, Ruby, and Smalltalk
ā£Seamless integration with existing Java classes and libraries
ā¢SwingBuilder
ā£Create Swing GUIs using Groovy ābuildersā
ā£Easy to develop and maintain
ā£Hierarchy of components
ā¢http://groovy.codehaus.org/
5. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Groovy and ODI Integration
ā¢Oracle Data Integrator is delivered with a Groovy editor
ā£Create and save .groovy script files
ā£Integrates with the ODI instance and security manager
ā¢Transaction management simplified
ā£Create transaction
ā£Persist
ā£Commit transaction
ā£On exception...Rollback transaction
6. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Develop Groovy in ODI Procedures
ā¢ODI Procedure and Knowledge Module steps
ā£Groovy as a Technology
ā¢Less integrated than .groovy scripts
ā£Must define
-Connection to repository
-ODI username & password
-ODI Instance for security and transaction
management
7. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Use Case - Developerās Quickstart
ā¢Case:
ā£Many find it difficult to use Oracle Data Integrator āright out of the boxā
ā£Other ETL tools provide a quick and easy way to begin development
ā¢Solution:
ā£Determine which tasks need to be automated and develop Groovy script
-Create Data Server, Physical Schema, and Logical Schema
-Map Logical Schema/Physical Schema using the default Global context
-Create new Model
-Build and execute Package to reverse engineer tables into ODI Datastores
ā£Initial code developed by Oracleās David Allan
āODI 11g ā Expert Accelerator for Model Creationā
https://blogs.oracle.com/dataintegration/entry/odi_11g_expert_accelerator_for
8. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Developerās Quickstart - Capture User Input
9. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Demonstration
Developerās Quickstart - ODI SDK and Groovy
10. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Use Case - Metadata Setup
ā¢Case:
ā£Setup of Staging and Foundation metadata
ā£Add data warehouse audit columns
ā¢Solution:
ā£Reverse engineer Source tables
ā£Copy tables to Staging and Foundation Models
ā£Add data warehouse audit columns to Foundation
Datastores via Groovy script
11. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Demonstration
Metadata Setup - ODI SDK and Groovy
12. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Use Case - Initial Load Setup: Interfaces, Scenarios, and Load Plans
ā¢Case:
ā£Setup objects for Source to Foundation initial load
ā¢Solution:
ā£Groovy scripts
-Create Source to Foundation Interfaces
-Generate a Scenario for each Interface
-Build a Load Plan to execute all Scenarios
13. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Initial Load Setup - InteractiveInterfaceHelperWithActions
14. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Demonstration
Initial Load Setup - Interfaces, Scenarios, & Load Plans - ODI SDK and Groovy
15. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Use Case - Migration to Oracle Data Integrator
ā¢Case:
ā£Automate the migration of mappings from an āoldā ETL tool to Oracle Data Integrator
ā£Oracle Warehouse Builder is the ETL tool in this example
ā¢Solution:
ā£Place the āoldā ETL tool metadata in a database schema
ā£Build Groovy scripts against the metadata to create ODI objects
-Topology
-Project
-Metadata
-Interfaces
16. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Migration to ODI - OWB Metadata
17. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Migration to ODI - OWB Metadata
18. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Demonstration
Migration to Oracle Data Integrator - ODI SDK and Groovy
19. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
ā¢More information can be found at http://www.rittmanmead.com
ā¢Contact us at info@rittmanmead.com or michael.rainey@rittmanmead.com
ā¢Follow-us on Twitter (@rittmanmead & @mRainey) or Facebook
(facebook.com/rittmanmead)
In summary...
ā¢ODI SDK can perform nearly every action as the ODI Studio
ā¢Groovy script is the language of choice for developing against the ODI SDK
ā£Java-based, but simple to develop
ā£Developed in Groovy script files or Procedure steps
ā¢Automation of large, batch tasks in ODI can save loads of time
20. T : +44 (0) 8446 697 995 E : enquiries@rittmanmead.com W: www.rittmanmead.com
Scripting and Automating ODI 11g using Groovy and the ODI SDK
Michael Rainey, Principal Consultant, Rittman Mead
Rittman Mead BI Forum 2013 Master Class, May 2013