Oracle Data Integrator User Functions, Variables and Advanced Mappings

Slides:



Advertisements
Similar presentations
CC SQL Utilities.
Advertisements

4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
WaveMaker Visual AJAX Studio 4.0 Training
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
Visual Basic for Applications. What it does Extends the features and built in functions of Excel – Create and run VB procedures – Some may be easy to.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
1 Creating and Tweaking Data HRP223 – 2010 October 24, 2011 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Chapter 4B: More Advanced PL/SQL Programming
Introduction to Structured Query Language (SQL)
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
Introduction to Structured Query Language (SQL)
5 Copyright © 2009, Oracle. All rights reserved. Defining ETL Mappings for Staging Data.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Structured Query Language (SQL) A2 Teacher Up skilling LECTURE 2.
Using the Select Case Statement and the MsgBox Function (Unit 8)
Tutorial 11 Using and Writing Visual Basic for Applications Code
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith.
8-1 3 Oracle Data Integrator Topology: Connecting to the World.
Chapter 7 Advanced SQL Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 11 Committed to Shaping the Next Generation of IT Experts. Chapter 10 Customizing a Database.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Oracle Data Integrator Procedures, Advanced Workflows.
Oracle Data Integrator Transformations: Adding More Complexity
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Microsoft Access 2013 ®® Tutorial 10 Automating Tasks with Macros.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Adding Parameters to Commands ADO.NET - Lesson 06  Training time: 15 minutes.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
JSTL The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications.
Oracle Data Integrator Data Quality (Integrity Control)
1 Chapter 4: Creating Simple Queries 4.1 Introduction to the Query Task 4.2 Selecting Columns and Filtering Rows 4.3 Creating New Columns with an Expression.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
CHAPTER 6 LESSON B Creating Custom Forms. Lesson B Objectives  Suppress default system messages  Create alerts and messages to provide system feedback.
Variants with be.as script. © beas group 2011 / Page 2 This documentation and training is provided to you by beas group AG. The documents are neither.
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
CS422 Principles of Database Systems Stored Procedures and Triggers Chengyu Sun California State University, Los Angeles.
1. Advanced SQL Functions Procedural Constructs Triggers.
C++ for Engineers and Scientists Second Edition Chapter 4 Selection Structures.
Business rules.
Data Type and Function Prepared for CSB210 Pemrograman Berorientasi Objek By Indriani Noor Hapsari, ST, MT Source: study.
PL/pgSQL
Relational Database Design
Introduction to PL/SQL Programing
Value-Returning Functions
SQL MODELER - OPEN There are Three Ways to open the SQL Modeler
Section 3.2c Strings and Method Signatures
Microsoft Access Illustrated
Exploring Microsoft Office Access 2007
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Producing Triggers Schedule: Timing Topic 40 minutes Lecture
Contents Preface I Introduction Lesson Objectives I-2
Chapter 8 Advanced SQL.
Presentation transcript:

Oracle Data Integrator User Functions, Variables and Advanced Mappings 7 Oracle Data Integrator User Functions, Variables and Advanced Mappings 14-1

Objectives After completing this lesson, you will know how to use: Variables Sequences User Functions Advanced Mappings 14-2

What Is a Variable? Variable – An ODI object which stores a typed value, such as a number, string or date. Variables are used to customize transformations as well as to implement control structures, such as if-then statements and loops, into packages. 14-3

Variable Scope Scope defines where the variable can be used. Global variables are accessible everywhere (defined in the Others tab of the Designer tree). Project variables are accessible within the project (and defined under the project in the Designer tree). The scope is defined by the location of the variable: Global variables: in the Others view, under Global variables Project variables: in the Projects view, under Variables To refer to a variable, prefix its name according to its scope: Global variables: GLOBAL.<variable_name> Project variables: <project_code>.<variable_name> 14-4

Variable Configuration: The Definition Historize: keep all values taken by the Variable Last value: only keep the most recent value Not persistent: discard the value Data type: Alphanumeric (250 chars) Date (Java format) Numeric (10 digits). Value given if no stored value Description of variable 14-5

Variable Configuration: The Query Logical Schema used for refreshing SQL Refresh instruction The result of a SQL query can be stored into a variable: The query must return a single value of the correct type. The query is executed by a Refresh Variable package step. Can also refresh manually. 14-6

Using a Variable in The Mappings When used, a variable is prefixed according to its scope: Global variable: GLOBAL.<variable_name> Project variable: <project_code>.<variable_name> Tip: Use the Expression Editor to avoid mistakes in variables names. Variables are used either by string substitution or by parameter binding. Substitution: #<project_code>.<variable_name> Binding: :<project_code>.<variable_name> 14-7

How to Create a Variable Step in a Package Select the variable from the Projects or Others view. Drag and drop it into the package. Select the type of operation to perform: evaluate, set/increment, refresh or declare. Set the options for the operation to perform. 14-8

Variable Steps Declare Variable step type: Set Variable step type: Forces a variable to be taken into account. Use this step for variables used in transformations, or in the topology. Set Variable step type: Assigns a value to a variable or increments the numeric variable of the value. 14-9

Variable Steps (cont.) Refresh Variable step type: Refreshes the value of the variable by executing the defined SQL query. Evaluate Variable step type: Compares the variable value with a given value, according to an operator. You can use a variable in the value in the value 14-10

User Functions 14-11

What Is a User Function? User Function – A cross-technology macro defined in a lightweight syntax used to create an alias for a recurrent piece of code or encapsulate a customized transformation. 14-12

Simple Example #1 A simple formula: If <param1> is null then <param2> else <param1> end if Can be implemented differently in different technologies: Oracle nvl(<param1>, <param2>) Other technologies: case when <param1> is null then <param2> else <param1> end And could be aliased to: NumberToTitle(<param1>, <param2>) 14-13

Simple Example #2 A commonly used formula: Could be aliased to: 14-14 If <param1> = ‘1’ then ‘Mr’ else if <param1> = ‘2’ then ‘Ms’ else if <param1> = ‘3’ then ‘Mrs’ else if <param2> = 77 then ‘Dr’ else if <Param2> = 78 then ‘Prof’ else ‘’ end if Could be aliased to: NumberToTitle(<param1>, <param2>) 14-14

Properties of User Functions A user function always has: A syntax: defines how the function is called by other objects in ODI Several implementations specific to different technologies A scope Global functions can be used anywhere. Project functions can be used within their project. User functions are organized into groups. 14-15

How to Create a User Function Select the Functions node in a project, or in the Others view Right-click > Insert Function Fill in the: Name Syntax Description Select the Group, or type in the name of a new group. 14-16

Defining the Implementations Select the Implementations tab Click the Add button. Enter the code for the implementation Select the applicable technologies. 14-17

Syntax of the Implementations The function's syntax and implementation arguments are specified in one of the following formats: $(<arg_name>) $(<arg_name>)<arg_type> If <arg_type> is supplied it must be s (string), n (numeric) or d (date). For example: $(title)s Argument names in the syntax and implementation should match exactly. Examples: Syntax: NullValue($(myvariable), $(mydefault)) Implementation: case when $(myvariable) is null then $(mydefault) else $(myvariable) end 14-18

Using User Functions At design-time, you can refer to user functions like any regular database function You can use them in mappings, joins, filters, procedures, etc. They are available in the expression editor. When the code is generated: Project functions are identified first, then global functions. If a function is recognized, it is turned into the implementation corresponding to the technology of the generated code. If the function is not recognized, the generated code remains unchanged. 14-19