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 substitution methods in Java


For this recipe, we will make a very simple modification to the IKM SQL Control Append by combining a Java variable and a substitution API. Then we will use this KM in an interface to see how the code gets generated.

Getting ready

You will need to have a project ready where the IKM SQL Control Append KM has been imported. You must also have a table that can be used as a target table using this IKM in an interface.

How to do it...

  1. Rename the IKM SQL Control Append KM to IKM SQL Control Append with Variable and Substitution.

  2. Add a step. Name the step Retrieve Session Number and write the following code in that step:

    <%v_sess=odiRef.getSession("SESS_NO")%>

    Tip

    There is no need to set the technology for this step: as you will see when we use the KM, no code will actually be generated for the agent to run.

  3. Move this step up to make sure that it is the very first step in the KM, the same way we did it in step 6 of Using Java variables in KMs.

  4. Edit the step Create...