270 likes | 412 Views
Accessing Non-Oracle Sources. Objectives. After completing this lesson, you should be able to: Explain the concepts behind code templates (CTs) Identify the location of code templates that ship with the product Import code templates Describe how to create new code templates
E N D
Objectives • After completing this lesson, you should be able to: • Explain the concepts behind code templates (CTs) • Identify the location of code templates that ship with the product • Import code templates • Describe how to create new code templates • Describe how to define new integration platforms
Lesson Agenda • Concepts behind code templates • Location of seeded code templates that ship with the product • Importing code templates • Creating new code templates • Creating new integration platforms
Extensible Framework of OWB 11g Release 2 11g R1 • Non-modifiable: • PL/SQL • SQL • ABAP • SQL*Loader Platforms:Oracleor file Mappingdesign Connectivity:Oracle, Gateway, or ODBC Code templates:internal, notaddressable 11g R2 • Non-modifiable: • PL/SQL • SQL • ABAP • SQL*Loader plus … Extensible: Code template support Connectivity:Oracle, Gateway, ODBC, JDBC,Native Extensibleplatforms Mappingdesign Codetemplates:extensible,pluggable Oracle and file platforms,plus user-definedplatforms New operators, plus enhancements to the existing ones Native connectivity takes advantage ofthe host system services, such as loaders.
What Is a Code Template? • Code Templates (CTs) in Oracle Warehouse Builder are components that implement reusable transformation and ETL (extract, transform, and load) strategies across different technologies. • Warehouse Builder ships with various predefined CTs. • You can directly use these in your mappings, or • Adapt them to your specific requirements • Warehouse Builder implements six types of CTs: • Integration code template (ICT) • Load code template (LCT) • Control code template (CCT) • Change data capture code template (CDCCT) • Oracle target code template (OTCT) • Function code template (FCT) The Integration, Load, Control, and CDC code templates are based on the ODI 10g API Reference.
An Open Extensibility Framework Pluggable Code Template Framework CDC CT Load CT Integration CT Custom metadata import Control CT Load Integrate/ Oracle Tgt CDC Control Sample seeded code templates Oracle LogMiner SQL Server Triggers DB2 UDB Triggers SQL to SQL Oracle Control Oracle SQL*Loader Oracle Target Oracle DBLink
Non-modifiable: • PL/SQL • SQL • ABAP • SQL*Loader Code templates:internal, notaddressable • Non-modifiable: • PL/SQL • SQL • ABAP • SQL*Loader plus … Extensible: Code template support (LCT, ICT, JCT, CCT, OTCT) Codetemplates:extensible,pluggable Benefits of Extensible Code Templates • Architectural flexibility • Alternative data movement strategies • Greater integration via Open Connectivity framework • Implementations for standard design patterns • Integrate new database features outside product release cycles • Construct and share modular templates
CT-based mapping =Mapping design plus code templates + platform definition What Is a Code Template Mapping? • New CT-based mappings: • Mapping designplus • Code templates • Platform definition • Traditional mappings: • Mapping design
SQLServer Informix Sybase Othersources Typical Usage of Code Templates Datasources Performance data layer Stagingdata layer Operational data layer Messagequeue Code templatesin OWB Oracle Warehouse Builder
Lesson Agenda • Concepts behind code templates • Location of seeded code templates that ship with the product • Importing code templates • Creating new code templates • Creating new integration platforms
Location of Seeded Code Templates Types of seeded code templates: • Load code templates (LCT) • Integration code templates (ICT) • Control code templates CCT) • Oracle target code templates (TCT, leveraging OWB’s existing engine) • Change data capture code templates (CDC)
Quiz • Which of the following are benefits of using code templates? • Architectural flexibility • Built-in graphical debugger • Integrate new database features outside product release cycles • Implementations for standard design patterns • Support for rapid application development • Construct and share modular templates
Lesson Agenda • Concepts behind code templates • Location of seeded code templates that ship with the product • Importing code templates • Creating new code templates • Creating new integration platforms
Imported CT Opened in OWB CT Editor CT Editor Tasklist • Code templates can be imported from Oracle Data Integrator (ODI) files included in the OWB product. • The import process is wizard-driven. • In ODI, code templates are called “knowledge modules.” Task Editor
Practice 3-1 Overview: Examine Built-In and Imported Code Templates • This practice covers: • Examining the code templates built into Warehouse Builder. • Importing some predefined code templates shipped with Warehouse Builder, but not built-in.
Lesson Agenda • Concepts behind code templates • Location of seeded code templates that ship with the product • Importing code templates • Creating new code templates • Creating new integration platforms
Creating New Code Templates You specify the tasks between the Start and End tasks. Example: Bulk extract from SQL Server CT
Lesson Agenda • Concepts behind code templates • Location of seeded code templates that ship with the product • Importing code templates • Creating new code templates • Defining new integration platforms • Set up platform properties. • Define data type mapping between heterogeneous source and target. • Add connectivity. • Use code templates in mappings.
What Is an Integration Platform • A platform is the minimum set of metadata (data types, locations, and so on) necessary to connect to a source or target system other than Oracle. • The platform represents that system. Seededplatforms
Warehouse Builder 1. 2. 3. 4. Platform properties Data typemapping design Connectivity(JDBC, ODBC, and Native) Code templatesin mapping Metadata infrastructure Define New Integration Platforms in OWB • CT-based mapping =Mapping design + code templates + platform definition
Setting Up Platform Properties • Change the user interface. • Add module types.
Creating Data Type Mappings • Define data types. • Map the data types to or from the core. Oracletypes DB2types XMLtypes Coretypes SQLServertypes Teradatatypes
CT-based mappings are created under the Template Mappings node. The data type mapping that you define (from the platform to the generic data type set) will be used by the CT mapping. Using Code Templates in Mappings
Hybrid Design: Combine Template Extract with PL/SQL This execution unit usesLoad File to External Table code template Use code templateextract for heterogeneousconnectivity OWB provides a hybrid design where execution units in a single mapping can be a mixture of those assigned a Load or Integration code template plus an Oracle Target code template to leverage OWB code generation capabilities. This execution unit usesOracle Target code template Use Oracle Transformsfor full Oracle PL/SQL functionality
Quiz • A platform is the minimum set of metadata (data types, locations, and so on) necessary to connect to a source or target system other than Oracle. • True • False
Summary • In this lesson, you should have learned how to: • Explain the concepts behind code templates (CTs) • Identify the location of code templates that ship with the product • Import code templates • Describe how to create new code templates • Describe how to define new integration platforms