In Designer Navigator select the Sequences node in a project or the Global
12.4 Working with User Functions
This section provides an introduction to user functions and describes how to create and use user functions in Oracle Data Integrator.12.4.1 Introduction User Functions
User functions are used for defining customized functions that can be used in interfaces or procedures. It is recommended to use them in your projects when the same complex transformation pattern needs to be assigned to different datastores within different interfaces. User functions improve code sharing and reusability and facilitate the maintenance and the portability of your developments across different target platforms. User functions are implemented in one or more technologies and can be used anywhere in mappings, joins, filters and conditions. Refer to Section 12.4.3, Using User Functions . A function can be created as a global function or in a project. In the first case, it is common to all projects, and in the second, it is attached to the project in which it is defined. User functions can call other user functions. A user function cannot call itself recursively. The following sections describe how to create and use user functions.12.4.2 Creating User Functions
To create a user function:1. In Designer Navigator select the User Functions node in a project or the Global
User Functions node in the Others view. 2. Right-click and select New User Function. The User Function Editor opens. 3. Fill in the following fields: ■ Name : Name of the user function, for example NullValue Note: Aggregate functions are not supported User Functions. The aggregate function code will be created, but the GROUP BY expression will not be generated. 12-24 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator ■ Group : Group of the user function. If you type a group name that does not exist, a new group will be created with this group name when the function is saved. ■ Syntax : Syntax of the user function that will appear in the expression Editor; The arguments of the function must be specified in this syntax, for example NullValuevariable, default4. From the File menu, click Save.
The function appears in the Projects or Others tree in Designer Navigator. Since it has no implementation, it is unusable. To create an implementation: 1. In Designer Navigator double-click the User Function for which you want to create the implementation. The User Function Editor opens.2. In the Implementations tab of the User Function Editor, click Add
Implementation . The Implementation dialog opens.3. In the Implementation syntax field, type the code of the implementation, for
example nvlvariable, default 4. Check the boxes for the implementations Linked technologies5. Check Automatically include new technologies if you want the new technologies
to use this syntax.6. Click OK.
7. From the File menu, click Save.
To change an implementation:1. In the Implementations tab of the User Function Editor, select an implementation,
then click Edit.2. In the Implementations tab of the user function, select an implementation, then
click Edit Implementation. The Implementation dialog opens. 3. Change the Implementation syntax and the Linked technologies of this implementation4. Check Automatically include new technologies if you want the new technologies
to use this syntax.5. Click OK.
6. From the File menu, click Save.
To remove an implementation: In the implementations tab of the user function, select an implementation, then click Delete Implementation .12.4.3 Using User Functions
The user functions can be used in all Oracle Data Integrator expressions: ■ Mappings, ■ Filters, ■ Joins, ■ Constraints,Parts
» Oracle Fusion Middleware Online Documentation Library
» Data Integration Oracle Data Integrator
» E-LT Introduction to Data Integration with Oracle Data Integrator
» Introduction to Declarative Design
» Introduction to Knowledge Modules
» Datastores Declarative Rules Introduction to Integration Interfaces
» Data Flow Introduction to Integration Interfaces
» Batch Oriented Integration Typical ODI Integration Projects
» Event Oriented Integration Typical ODI Integration Projects
» Service-Oriented Architecture Typical ODI Integration Projects
» Managing Environments Typical ODI Integration Projects
» Repositories Oracle Data Integrator Architecture
» User Interfaces Oracle Data Integrator Architecture
» Design-time Projects Run-Time Agent
» Oracle Data Integrator QuickStart List
» Introduction to Oracle Data Integrator Repositories
» Creating Repository Storage Spaces
» Creating the Master Repository
» Connecting to the Master Repository
» Connecting to a Work Repository
» Changing the Work Repository Password
» Attaching and Deleting a Work Repository Erasing a Work Repository Renumbering Repositories
» Tuning the Repository Advanced Actions for Administering Repositories
» Physical Architecture Introduction to the Oracle Data Integrator Topology
» Contexts Introduction to the Oracle Data Integrator Topology
» Logical Architecture Agents Introduction to the Oracle Data Integrator Topology
» Languages Introduction to the Oracle Data Integrator Topology
» Repositories Introduction to the Oracle Data Integrator Topology
» Pre-requisites and Guidelines Creating a Data Server
» In Topology Navigator expand the Technologies node in the Physical Architecture
» Right-click and select New Data Server
» Fill in the following fields in the Definition tab:
» From the File menu, click Save to validate the creation of the data server.
» On the Properties tab click Add a Property. From the File menu, click Save.
» On the DataSources tab of the Data Server editor click Add a DataSource
» Select a physical Agent in the Agent field.
» Enter the data source name in the JNDI Name field.
» On the On ConnectDisconnect tab of the Data Server editor, click Launch the
» Click OK. The SQL command is displayed in the Command field.
» Optionally, select Commit, if you want to commit the connection after executing
» Optionally, select Ignore Errors, if you want to ignore the exceptions encountered
» In Topology Navigator expand the Technologies node in the Physical
» Double-click the data server you want to test. The Data Server Editor opens.
» Click Test Connection. Testing a Data Server Connection
» Select the agent that will carry out the test. Local No Agent indicates that the
» Click Detail to obtain the characteristics and capacities of the database and JDBC
» Click Test to launch the test.
» Creating a Context Creating a Physical Schema
» Creating a Logical Schema Creating a Physical Agent
» Configuring the Standalone Agent
» Launching a Standalone Agent
» Change directory to the agentbin directory of the Oracle Data Integrator
» Enter the following command to stop the agent.
» Select New Agent. Deploying an Agent in a Java EE Application Server Oracle WebLogic Server
» In the Definition tab, pay attention to the following parameters.
» Provide a JNDI name for these data sources.
» From the Physical Agent Editor toolbar menu, select Generate WLS Template.
» In the Agent Information step, review the agent information and modify the
» Click Next. Deploying an Agent in a Java EE Application Server Oracle WebLogic Server
» Delegating Sessions Agent Unavailable Setting Up Load Balancing
» Datastores Introduction to Models
» Data Integrity Reverse-engineering Introduction to Models
» Changed Data Capture Introduction to Models
» Creating a Model Creating and Reverse-Engineering a Model
» Reverse-engineering a Model Creating and Reverse-Engineering a Model
» Creating a Datastore Creating and Reverse-Engineering a Datastore
» Go to the Columns tab the file datastore that has a fixed format.
» Click the Reverse button. A window opens displaying the first records of your file.
» You must set at least the Column Name, Datatype and Length for each column.
» Go to the Columns tab the file datastore that has a delimited format.
» Click the Reverse COBOL Copybook button.
» Click OK. The columns described in the Copybook are reverse-engineered and
» Select Save from the File main menu.
» Adding and Deleting Datastore Columns
» In the Designer Navigator, expand in the Model tree the model and then the
» Select the Constraints node, right-click and select New Key.
» Enter the Name for the constraint, and then select the Key or Index Type. Primary
» In the Columns tab, select the list of columns that belong to this key.
» In the Control tab, select whether this constraint should be checked by default in a
» By clicking the Check button, you can retrieve the number of records that do not
» In the Designer Navigator, expand in the Model tree the model and then one of
» Select the Constraints node, right-click and select New Reference.
» Enter the Name for the constraint, and then select the Type for the reference. In a
» If you want to reference a datastore that exists in a model, select the Model and
» If you are defining a User or Database reference, in the Columns tab, define the
» If you are defining a Complex User reference, enter in the Expression tab the
» By clicking the Check button, you can retrieve the number of records that respect
» Select the Constraints node, right-click and select New Condition.
» Enter the Name for the constraint, and then select the Type for the condition. An
» In the Where field enter the expression that implements the condition. This
» Type in the Message field the error message for this constraint.
» Introduction to Data Integrity
» Checking a Constraint Checking Data Quality in a Model
» Perform a Static Check on a Model, Sub-Model or Datastore
» Reviewing Erroneous Records Checking Data Quality in a Model
» Why assemble datastores and columns from other models?
» Graphical Synonyms Introduction to Common Format Designer
» Create Datastores and Columns
» Creating Graphical Synonyms Using the Diagram
» Creating and Editing Constraints and Filters
» Editing and Viewing a Datastores Data Generating DDL scripts
» Generating Interface INOUT Oracle Fusion Middleware Online Documentation Library
» The Journalizing Components Introduction to Changed Data Capture
» Simple vs. Consistent Set Journalizing
» Setting up and Starting Journalizing
» Journalizing Infrastructure Details Setting up Journalizing
» Journalizing Status Setting up Journalizing
» Viewing Changed Data Using Changed Data
» Using Changed Data: Simple Journalizing
» Using Changed Data: Consistent Set Journalizing
» Journalizing Tools Using Changed Data
» Package Templates for Using Journalizing
» Introduction to Data Services
» Configuring the Web Services Container
» Configuring the Model Setting Up Data Services
» Generating and Deploying Data Services Overview of Generated Services
» Testing Data Services Generating and Deploying Data Services
» Oracle Data Integrator Project Components
» Global Components Oracle Data Integrator Project Components
» Project Life Cycle Introduction to Integration Projects
» Knowledge Modules Naming Convention
» Choosing the Right Knowledge Modules Importing and Replacing Knowledge Modules
» Organizing the Project with Folders
» Introduction to Steps Introduction to Packages
» Introduction to Creating Packages
» Introduction to the Package editor
» Drag and drop the interface into the diagram. A flow Step appears.
» Open the Package editor and go to the Diagram tab.
» In Designer Navigator, select the variable to add to the Package from the Projects
» In the General tab, fill in the Step Name field. Select Refresh Variable in the Step
» From the File menu, click Save.
» In the General tab, fill in the Step Name field. Select Set Variable in the Step Type.
» Select Assign or Increment depending on the operation you want to perform on
» Type in the Value field the value to set or the increment. This value may be
» In the General tab, fill in the Step Name field. Select Evaluate Variable in the Step
» Select the Operator used to compare the variable value.
» Type in the Value field the value to compare with your variable. This value may be
» From the Package Toolbox, select the tool that you want to use. Note that Open
» In the General tab of the properties panel, fill in the Step Name field.
» Set the values for the parameters of the tool. The parameters descriptions appear
» You can edit the code of this tool call in the Command tab.
» Model, Sub-Models and Datastore Related Steps
» Running a Step Editing a Step’s Linked Object
» Creating a new Package Defining the Sequence of Steps
» Running the Package Oracle Fusion Middleware Online Documentation Library
» Components of an Integration Interface
» Introduction to the Interface Editor
» In the Target Datastore panel, select the title of the target datastore Temporary
» On the Diagram Property tab of Property Inspector, type in a Name for this
» Select the Context for this datastore if you want to target this datastore in a
» Specify the Temporary Datastore Location. Select Work Schema or Data Schema
» Go to the Overview tab and select the logical schema into which this temporary
» In the Target Datastore panel, right-click the title bar that shows the name of the
» Select Add Column. Temporary Target Datastore
» A new empty column appears in the Target Datastore panel. Select this new
» In Diagram Property tab of the Target Mapping Property Inspector give the new
» Right-click the column to be deleted In the Target Datastore panel. Select Delete.
» Right-click and select Add Column to Target Table.
» Right-click and select Add to Target.
» In the Target Datastore panel, select the title bar that shows the name of the target
» In the Diagram Property tab, select the Update Key from the list.
» Unselect the update key, if it is selected. This step applies only for permanent
» In the Target Datastore panel, select one of the columns that is part of the update
» In the Diagram Property tab, check the Key box. A key symbol appears in front of
» Repeat the operation for each column that is part of the update key.
» Define the Datasets Creating an Interface
» In the Designer Navigator, expand the Models tree and expand the model or
» In the Diagram Property tab of the Property Inspector, modify the Alias of the
» Select the Context for this datastore if you want to source data from this datastore
» In the Designer Navigator, expand the Projects tree and expand the project
» Select Delete. Define the Source Datastores
» Click OK in the Confirmation dialog.
» Select Number of Lines to display the number of rows in this source datastore or
» From the Source Diagram toolbar menu, select Add a new Lookup. The Lookup
» In the Lookup Table Wizard select your Driving Table from the left pane. Source
» From the tree in the Lookup Table pane on the right, do one of the following:
» Modify the Alias of the lookup table. The alias is used to prefix column names.
» Click Join. The join condition appears in the Lookup condition text field. You can
» Click Finish. Your lookup appears in the Source Diagram of your dataset.
» Right-click and select Delete.
» In the Source Diagram, select one or several columns in the source datastore you
» In the Diagram Property tab of the Property Inspector, modify the
» Select the execution location: Source or Staging Area.
» Click the Check the Expression in the DBMS to validate the expression.
» Check the Active Filter box to enable or disable this filter. It is enabled by default.
» Right-click and select Number of Lines to display the number of rows after the
» In the Source Diagram, select a column in the first source datastore to join, and
» Optionally, you can click the Check the Expression in the DBMS to validate the
» Select the type of join rightleft, innerouter, cross, natural. The text describing
» If you want to use an ordered join syntax for this join, check the Ordered Join
» Check the Active Clause box to enable or disable this join. You can disable a join
» Define the Mappings Creating an Interface
» In the Controls tab of the interface, select a CKM from the CKM Selector list.
» Select the Constraints to be checked.
» Fill in the Maximum number of errors allowed. Note that if you leave this field
» Check the box if you want the interface to fail when a percentage of errors is
» Set up Post-Integration Control
» Execute the Integration Interface
» From the toolbar menu, select Add.
» Select the left source and right source column and click Join. The join condition is
» From the toolbar menu, select Remove.
» Editing a Component Using the Quick-Edit Editor
» Adding, Removing, and Configuring Datasets Changing the Target DataStore
» Customizing Tables Using Keyboard Navigation for Common Tasks
» Designing Integration Interfaces: E-LT- and ETL-Style Interfaces
» Introduction to Procedures Working with Procedures
» In Designer Navigator select the Procedures node in the folder under the project
» Right-click and select New Procedure.
» On the Definition tab fill in the procedure Name.
» Check the Multi-Connections if you want the procedure to manage more than one
» Select the Target Technology and if the Multi-Connections box is checked also
» In Designer Navigator select your procedures node.
» Right-click and select New Option. The Procedure Option Editor is displayed.
» Fill in the following fields:
» Repeat these operations for each option that is required for the procedure.
» In Designer Navigator double-click the procedure for which you want to create a
» In the Procedure Editor, go to the Details tab
» Click Add. Enter the name for your new command. The Command Line Editor
» In the Command Line Editor fill in the following fields:
» In the Command on Target tab, fill in the following fields:
» For Multi-Connections Procedures, repeat step 5 for the Command on Source tab.
» In the Options section, check the Always Execute box if you want this command
» Go to the Details tab of the Procedure.
» Right-click then select Duplicate. The Command Line Editor opens. It is a copy of
» Make the necessary modifications and from the File menu, click Save.
» From the Editor toolbar, click Delete.
» In the Command on Source tab, specify the SELECT statement.
» In the Command on Target tab, specify the action code. The action code can itself
» In the Project view of the Designer Navigator, select the procedure you want to
» Right-click and select Execute.
» In the Execution dialog, set the execution parameters. Refer to
» Click OK. Executing the Procedure
» The Session Started Window appears.
» Using a Procedure in a Package
» Generating a Scenario for a Procedure
» Right-click the KM or procedure you wish to encrypt.
» Select Encrypt. Encrypting a KM or Procedure
» Right-click the KM or procedure that you wish to decrypt.
» Select Decrypt. Decrypting a KM or Procedure
» In the KMProcedure Decryption dialog, either:
» Introduction to Variables Working with Variables
» Creating Variables Working with Variables
» Using Variables in Interfaces
» Using Variables in Object Properties
» Using Variables in Procedures
» Using Variables within Variables
» Create the FILE_SUFFIX variable in your DWH project and set its SQL SELECT
» Create a StoresLocation table as follows:
» Create three variables in your EDW project:
» Using Variables in On ConnectDisconnect Commands
» Passing a Variable to a Scenario
» Generating a Scenario for a Variable
» Introduction to Sequences Working with Sequences
» In Designer Navigator select the Sequences node in a project or the Global
» Type in the Native Sequence Name or click the browse button to select a sequence
» If you clicked the Browse button, in the Native Sequence Choice dialog, select a
» Select one of these sequences and click OK.
» Identity Columns Using Sequences and Identity Columns
» Introduction User Functions Working with User Functions
» Creating User Functions Working with User Functions
» Using User Functions Working with User Functions
» Introduction to Scenarios Oracle Fusion Middleware Online Documentation Library
» Generating a Scenario Oracle Fusion Middleware Online Documentation Library
» Regenerating a Scenario Oracle Fusion Middleware Online Documentation Library
» Import Scenarios Importing Scenarios in Production
» Replace a Scenario Importing Scenarios in Production
» Working with a Scenario from a Different Repository
» Generating a Group of Scenarios Exporting Scenarios Encrypting and Decrypting a Scenario
» Load Plan Execution Lifecycle
» Differences between Packages, Scenarios, and Load Plans
» Load Plan Structure Introduction to Load Plans
» Introduction to the Load Plan Editor
» Open the Load Plan Editor and go to the Steps tab.
» In the Load Plan Editor toolbar, select Add Step Add Step Wizard.
» Click Next. Adding Load Plan Steps
» Click Finish. Open the Load Plan editor and go to the Steps tab.
» In the Steps toolbar, select Add Step and the Quick Step option corresponding to
» In the Steps Hierarchy table of the Steps or Exceptions tab, select the Run Scenario
» In the Step Properties section of the Properties Inspector, click Lookup Scenario.
» In the Modify Run Scenario Step wizard, click Lookup Scenario and follow the
» Right-click and select Open the Linked Object.
» In the Step Properties section of the Properties Inspector, click Lookup Variable.
» In the Modify Case Step Dialog, click Lookup Variable and follow the instructions
» Right-click and select Regenerate. Note that this option is not available for
» Click OK. Editing Load Plan Steps
» Right-click and select Refresh Scenarios to Latest Version. Note that this option is
» In the Steps Hierarchy table, select the step to delete.
» In the Load Plan Editor toolbar, select Remove Step.
» In the Steps Hierarchy table, right-click the step to duplicate and select Duplicate
» Open the Load Plan editor and go to the Variables tab.
» From the Load Plan Editor toolbar, select Add Variable. The Lookup Variable
» In the Lookup Variable dialog, select the variable to add your Load Plan.
» The variable appears in the Variables tab of the Load Plan Editor and in the
» Running Load Plans Oracle Fusion Middleware Online Documentation Library
» Running Load Plans in Production Scheduling Load Plans
» Exporting Load Plans Exporting, Importing and Versioning Load Plans
» Importing Load Plans Exporting, Importing and Versioning Load Plans
» Versioning Load Plans Exporting, Importing and Versioning Load Plans
» Introduction to Web Services in Oracle Data Integrator
» Data Services Oracle Fusion Middleware Online Documentation Library
» Oracle Data Integrator Run-Time Services
» Introduction to Web Service Invocation
» Using the OdiInvokeWebService Tool
» Web Service Invocation in Integration Flows
» Introduction to Oracle Data Quality Products
» Open the Metabase Manager Start All Programs Oracle Oracle Data
» Double-click Loader Connections. Step 1: Validate Loader Connections
» Copy the flat file that you want to import into Oracle Data Quality for Data
» Click on the Windows Start menu and select All Programs Oracle Oracle Data
» The Create Entity wizard opens in the upper right pane.
» On the Connection Page of the Create Entity wizard, select the Loader Connection
» Leave the default settings for the filter and the connection and click Next. Oracle Data Quality
» In the Entity Selection dialog, select the data source file name you want to import
» Create a Oracle Data Quality Project
» Export the Data Quality Project
» Reverse-engineer the Entities The Data Quality Process
» Sequence the Process in a Package
» Arranging Project Folders Organizing Projects with Folders
» Arranging Model Folders Organizing Models with Folders
» Creating and Organizing Sub-Models
» Browsing Cross-References Using Cross-References
» Markers Using Markers and Memos
» Concurrent Editing Check Handling Concurrent Changes
» Object Locking Handling Concurrent Changes
» Generating a Topology Report
» Generating a Report for the Version Comparison Results
» Generating a Report for an Oracle Data Integrator Object
» Working with Versions Oracle Fusion Middleware Online Documentation Library
» Viewing the Differences between two Versions
» Using Comparison Filters Working with the Version Comparison Tool
» Generating and Printing a Report of your Comparison Results
» Working with Elements in a Solution
» Synchronizing Solutions Working with Solutions
» Restoring and Checking in a Solution
» Importing and Exporting Solutions
» Internal Identifiers IDs Import and Export Concepts
» Relationships between Objects Import and Export Concepts
» Import Modes Import and Export Concepts
» Tips for ImportExport Import and Export Concepts
» Export Multiple ODI Objects Importing Objects
» Exporting and Importing the Master Repository ExportImport the Topology and Security Settings
» Exporting and Importing a Work Repository
» Exporting the Technical Environment
» Understanding ODI Executions Oracle Fusion Middleware Online Documentation Library
» Executing Interfaces, Procedures, Packages and Model Operations
» Executing a Scenario from ODI Studio
» Executing a Scenario from a Command Line
» Restarting a Session from ODI Studio
» Restarting a Session from a Command Line
» Stopping a Session From ODI Studio
» Stopping a Session From a Command Line
» Executing a Load Plan from ODI Studio
» Executing a Load Plan from a Command Line
» Restarting a Load Plan from ODI Studio
» Restarting a Load Plan from a Command Line
» Stopping a Load Plan from ODI Studio
» Stopping a Load Plan Run from a Command Line
» Right-click the Scheduling node under a scenario or a Load Plan in the Designer
» In Topology Navigator expand the Agents node in the Physical Architecture
» Select the Physical Agent you want to update the schedule.
» In the Select Repositories dialog, select the repositories from which you want to
» Click OK. Updating an Agent’s Schedule
» Right-click and select View Schedule.
» Scheduling a Scenario or a Load Plan with an External Scheduler
» Simulating an Execution Oracle Fusion Middleware Online Documentation Library
» Introduction to Run-Time Web Services
» Executing a Scenario Using a Web Service
» Monitoring a Session Status Using a Web Service
» Restarting a Session Using a Web Service
» Executing a Load Plan Using a Web Service
» Stopping a Load Plan Run Using a Web Service
» Accessing the Web Service from a Command Line
» Using the Run-Time Web Services with External Authentication
» Using WS-Addressing Managing Executions Using Web Services
» Using Asynchronous Web Services with Callback
» Introduction to Operator Navigator
» Scenarios Sessions Introduction to Monitoring
» Load Plans Load Plan Executions
» Schedules Log Status Introduction to Monitoring
» Monitoring Sessions Monitoring Executions Results
» Monitoring Load Plan Runs Handling Failed Sessions
» Reviewing Successful Sessions Monitoring Executions Results
» Reviewing Successful Load Plans
» From the Operator Navigator toolbar menu select Connect Navigator Purge
» From the Operator Navigator toolbar menu select Connect Navigator Export
» Managing Load Plan Executions Managing Schedules
» Introduction to Oracle Data Integrator Console
» Oracle Data Integrator Console Interface
» Connecting to Oracle Data Integrator Console
» Generic User Operations Using Oracle Data Integrator Console
» Managing Scenarios and Sessions
» Managing Load Plans Using Oracle Data Integrator Console
» Purging the Log Using Oracle Data Integrator Console
» Using Data Lineage and Flow Map
» Performing Administrative Operations Using Oracle Data Integrator Console
» Objects, Instances and Methods
» Profiles Introduction to Oracle Data Integrator Security
» Users Introduction to Oracle Data Integrator Security
» Security Policy Approach Setting up a Security Policy
» In Security Navigator expand the Profiles accordion.
» Click New Profile in the toolbar of the Profiles accordion.
» In the Name field, enter a name for your profile.
» From the File main menu, select Save.
» Select the profile that you want to duplicate from the list of profiles.
» Right-click and select Duplicate.
» In Security Navigator expand the Users accordion.
» Click New User in the toolbar of the Users accordion.
» In the Name field, enter a name for your user.
» Provide the Initials for this user. From the File main menu, select Save.
» In Security Navigator expand the Users and the Profiles accordions.
» Select the profile that you want to assign, then drag it on the user you want to
» In Security Navigator expand the Users accordions.
» Expand the Profiles node under the user.
» Select Delete. Removing a Profile from a User
» In Security Navigator expand the Users accordion. Right-click and select Delete.
» Click OK in the Confirmation window.
Show more