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 the substitution passes


We will look here at some of the details of how ODI uses multiple substitution rounds to replace some of the code within KMs with the actual code that will be ultimately executed by the databases and scripts.

Getting ready

To follow along with the examples listed here, you will need an ODI project with at least the following KMs: LKM File to SQL (SQLLDR) and IKM SQL Control Append. From a resource perspective, you will need a Flat File model with at least one file defined and an Oracle model with at least one table.

How to do it...

  1. In your project, rename the LKM File to Oracle (SQLLDR) KM, to LKM File to Oracle (SQLLDR) with substitutions.

  2. Edit the LKM File to Oracle (SQLLDR) with substitutions KM and within the step identified as Call sqlldr, insert the following code immediately after the different import statements:

    # Loading table: <%=odiRef.getTargetTable("TABLE_NAME")%>
    # Full table name: <%=odiRef.getTable("L", "TARG_NAME", "A")%>
    # Loading server...