7.7 Datatype Editor

Use to define the datatypes associated with the technology.

These datatypes allow Oracle Data Integrator to generate handling scripts.

The technologies that store the formatted data allocate to each of them a type that defines their nature. For example: numeric, character, date, and so forth.

Some data server access drivers allow you to reverse the datatypes automatically from the Technologies tree in Topology Navigator.

To reverse the datatypes from the Technologies tree in Topology Navigator:

  1. Right-click the technology.

  2. Select Datatypes Reverse-engineering...

The Datatype Editor has the following tabs:

7.7.1 Definition

Properties Description
Code Code used in Oracle Data Integrator to refer to this datatype. This code is unique for this technology. The code is stored in models and flows in order to refer to the datatype.
Name Name of the datatype, as it appears in the graphic interface and the reports.
Reversed Code Code returned by the driver or a SQL reverse query.
Length Default Default value for the Length parameter in a data type.
Length Min Minimum accepted value for the Length parameter in a data type.
Length Max Maximum accepted value for the Length parameter in a data type.
Scale Default Default value for the Scale parameter in a data type.
Scale Min Minimum accepted value for the Scale parameter in a data type.
Scale Max Maximum accepted value for the Scale parameter in a data type.

SQL Generation Parameters

Properties Description
Create Table Syntax Syntax used to create a column of this type. The tags %L (Length) and %P (Precision) can be used in this syntax.
Writable Datatype Syntax Alternate syntax used to create a column that stores data for a writable datatype. The tags %L (Length) and %P (Precision) can be used in this syntax.

If the type is writable, then the Writable Datatype syntax and Create Table syntax should be the same.


Graphical Parameter

Properties Description
Letter used for the icon Letter used to represent the datatype (graphic ID code for this datatype).

Writable

Select this check box if this datatype can be used in an INSERT or UPDATE command. This is not the case, for example, for datatypes for which values are automatically set and cannot be modified such as IDENTITY columns.

Columns that are reversed with a datatype that is not writable are flagged read-only.

A datatype that is not writable should have an alternate Writable Datatype syntax defined, to enable Oracle Data Integrator to create temporary tables that store data of this type.

7.7.2 Converted to

The Converted to tab allows you to specify for the other technologies, the datatype corresponding to the current type. This datatype will be used if Oracle Data Integrator needs to create a work table on another technology that is a reflection of a datastore in the current technology.

For example:

The Oracle datatype VARCHAR2 will be transformed into VARCHAR on a Microsoft SQL Server data server.

For the data flow of an Oracle instance towards a SQL Server instance, the language generation engine may require conversion in both directions (for example, from Oracle to SQL Server and from SQL Server to Oracle).

New Datatype Conversion Rule Dialog

Use to create a new datatype conversion rule.

Click the green plus sign to open the New Datatype Conversion Rule dialog.

Properties Description
Technology Name of the technology.
Datatype Defines to which data type, your current data type, should be converted while data transformation.
Condition If it is not clear which is the best match, the Condition field allows you to provide a Java expression when this conversion will happen. The expression may use the variables SIZE and SCALE, which represent the length and scale of the source column. The expression is evaluated, after substituting the length and scale values for the SIZE and SCALE variables. If true for the given source datatype and target technology, then the target datatype may be used when converting from source technology to target technology.

For example:

When you open a String datatype in the File technology and switch to the 'Converted To' tab, add the condition, SIZE != null && SIZE <= 4000 in the line for Oracle - VARCHAR2. Then add another line for Oracle with CLOB as the datatype and in the Condition column add SIZE != null && SIZE > 4000. With this change, if the length of a String column in the File technology is greater than 4000, then the corresponding column created in Oracle technology will be CLOB.

Length Expression Allows to constrain the length of the datatype to be its maximum size, without taking up additional space.

This field allows you to type an expression like this.

min(SIZE, 38)

This will use SIZE as the length unless SIZE is greater than 38, in which case, 38 will be used.

Scale Expression Allows to constrain the length of the datatype to be its maximum size, without taking up additional space.

This field allows you to type an expression like this.

min(SIZE, 38)

This will use SIZE as the length unless SIZE is greater than 38, in which case, 38 will be used.


7.7.3 Converted from

This tab is used to view, in read-only mode, the data types of the other technologies that correspond to the current data types.

Oracle Fusion Middleware Connectivity and Knowledge Modules Guide for Oracle Data Integrator

Oracle Fusion Middleware Developing Integration Projects with Oracle Data Integrator