Book Image

Oracle Data Integrator 11g Cookbook

Book Image

Oracle Data Integrator 11g Cookbook

Overview of this book

Oracle Data Integrator (ODI) is Oracle's strategic data integration platform for high-speed data transformation and movement between different systems. From high-volume batches, to SOA-enabled data services, to trickle operations, ODI is a cutting-edge platform that offers heterogeneous connectivity, enterprise-level deployment, and strong administrative, diagnostic, and management capabilities."Oracle Data Integrator 11g Cookbook" will take you on a journey past your first steps with ODI to a new level of proficiency, lifting the cover on many of the internals of the product to help you better leverage the most advanced features.The first part of this book will focus on the administrative tasks required for a successful deployment, moving on to showing you how to best leverage Knowledge Modules with explanations of their internals and focus on specific examples. Next we will look into some advanced coding techniques for interfaces, packages, models, and a focus on XML. Finally the book will lift the cover on web services as well as the ODI SDK, along with additional advanced techniques that may be unknown to many users.Throughout "Oracle Data Integrator 11g Cookbook", the authors convey real-world advice and best practices learned from their extensive hands-on experience.
Table of Contents (19 chapters)
Oracle Data Integrator 11g Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Invoking Java from the KMs


So far in this chapter we have used Java to alter the code that is generated by ODI when we use KMs. But there may be cases where you want to generate Java code and actually run that code as part of the execution of the ODI processes. In this example, we will use Java code to write additional information to a file as we run an interface. There are two technologies that can be used in ODI to write Java code, namely Jython and Groovy. We will use Groovy here as it is closer to true Java code, but the use of one technology versus the other is mostly a matter of personal preference.

Getting ready

For this recipe, we will modify the IKM SQL Control Append KM, so make sure to import this KM into your project before getting started.

How to do it...

  1. Rename the IKM SQL Control Append KM to IKM SQL Control Append with Java Code.

  2. Right-click on the IKM SQL Control Append with Java Code and add New option. Call this option Audit File Name. Set the type to Value and the default...