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

Using Java for condition code generation


If we really want code generation to be flexible, we need to have the ability to choose what code is generated based on external elements. This means that at code generation time, we need to have the ability to chose among different portions of code. If we were to write pure Java code, an If statement would give us exactly what we are looking for. So our approach will be just this: take advantage of the fact that we can execute Java code to control code generation and always generate the proper code as needed.

Getting ready

For this recipe, we will reuse the KM that was created in the previous recipe. If you did not follow the necessary steps to create the KM, you will need to perform steps 1 through 6 of the previous recipe: Using Java Variables in KMs.

How to do it...

  1. Right-click on the IKM SQL Control Append with Variable KM to duplicate it. Then rename the copy of IKM SQL Control Append with Variable KM to IKM SQL Control Append with Variable and...