Skip to content

September 10, 2009
by kdevendr
15 Comments

Categories: ODI

Tags: ,

Single Post View


Sequence

Database Sequence

Create a database Sequence in Oracle.

create sequence test_sequence
minvalue 2
maxvalue 999
start with 2
increment by 2

Map your interface

image

Call the sequence in the respective column using this format

<SCHEMA_NAME>.<SEQUENCE_NAME>.NEXTVAL

TEMP.TEST_SEQUENCE.NEXTVAL

TEMP                    –  SCHEMA_NAME

TEST_SEQUENCE   –   SEQUENCE_NAME

  • Map it to  ‘Target’
  • Use ‘Insert’ only Option

image

run your interface and check for data.

image

ODI Sequence

Create an ODI sequence with the required option

image

Map the column and the sequence with the ODI_SEQUENCE as

:ODI_SEQ_NEXTVAL

:<COLON>_<ODI_SEQUENCE>_NEXTVAL

image

  • Map it to  ‘Target’
  • Use ‘Insert’ only Option
  • IKM SQL TO SQL APPEND  ( for Row by Row processing)

run the interface and check for the data

image

September 9, 2009
by Cezar Santos
3 Comments

Categories: Common Errors , ODI , Tips and Tricks

Tags: , , , , , , ,

Single Post View


How to get a constant or pseudo-column from source mapping

Hi,

Let me show you a small trick when is necesary to obtain some psedo-column (like rowid) or database function (like sysdate) .

If a direct mapping of those values is done, a error like this will happens:

If you try to create a source mapping to SYSDATE an error like this one will be raised

If you try to create a source mapping to SYSDATE an error like this one will be raised

For bypass this situation, a small trick could be used.

It is: just add ANY column from source table and comment it. From our previous example (image), it will look like:

sysdate /*SNP_COL.I_COL*/

Now no error is raise, note that no RED indicator exists at mapping.

Now no error is raised, note that no RED indicator exists at mapping.

That is all, just a small trick very usefull to mapping values from source that has no relation with a source column.

A query, a sequence, a function, any of this could be used with this technique.

See you all in the next post my friends!

Cezar Santos

September 6, 2009
by kdevendr
0 comments

Categories: ODI , Tips and Tricks

Single Post View


Lock Windows Layout

To Lock the Windows Layout in Designer, Operator, Topology and Security Manager from moving  , check mark option " Lock windows Layout "

Topology – > Windows – > Lock Windows Layout .

September 6, 2009
by kdevendr
2 Comments

Categories: ODI , Tips and Tricks

Single Post View


Hide Unused Technologies

To see only the list of Technologies used in Topology and Designer , check mark option " Hide Unused Technologies "

Topology – > Windows -> Hide Unused Technologies

September 6, 2009
by kdevendr
0 comments

Categories: ODI , Tips and Tricks

Single Post View


Tab at the Top

To have the Tab at the Top in Designer, Operator, Topology and Security Manager , check mark option " Tab at the Top "

Topology – > Windows -> Tab at the Top

Revert back the option to have Tab at the Bottom .

September 6, 2009
by kdevendr
0 comments

Categories: Common Errors , ODI , ODI Bug , Technology

Single Post View


oracle.jdbc.V8Compatible

When loading the data for ODI 10g and using the Oracle 10g driver , For columns with "DATE" data type,  only the date is captured and the hours, minutes , second are marked as 00.00.00 or Not shown at all.

In oracle the data will be without hour , minutes and Seconds.


To capture this enable a jdbc property called oracle.jdbc.v8compatible , under the Data Server of the Oracle


Now check for the data of Date columns, hours, minutes and second will be captured by rerunning the Interfaces again.


 

Issue with enabling this option

There is a known issue related to Enabling this option

When using Timestamp as datatype, Milliseconds are suppressed with zeroes i.e. all the data will be 01-jul-09 03:06:23.000 for correct data (source) 01-jul-09 03:06:23.234.



2. To solve this issue, make a duplicate of the above Data server where you have enabled the v8compatible option to be true. Delete the option or mark it as False in it .




Link your Physical and Logical Scheme to the new (Duplicate) Server and Re Run the interfaces. Look for the Data Now all the Milliseconds will be captured with exact precision


[ Note : There is known issues with ODI 3.4 and 3.5 where the writable Timestamp is entered wrong as ‘ TIMESTAMP( %L ) ‘ , as when ODI create work table it creates as TIMESTAMP (11) which would fail the interface and show an error .

The solution is remove the ( % L ) so the correct writable Data type Syntax is

TIMESTAMP ]

The other best solution for oracle.jdbc.V8Compatible is to use  oracle 11g  JDBC drivers.

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html

September 6, 2009
by kdevendr
5 Comments

Categories: Drivers , ODI , Technology

Single Post View


Oracle to Flat file

This is the Sample of source Table to be populated as Flat File.

Target [Flat File – region.dat]

1. Go to the Physical architecture of the Topology and insert a New Data Server under File Technology

2. For the JDBC Driver choose the " Sunopsis File JDBC Driver "

3. Define Physical schema by entering the Directory as shown in the image for Windows or define the Directory path of the Unix environment. ( Make sure your agent should be having permission for that folder and file )

For windows enter the path with " /" even though windows shows directory with " "

4. Link to the Logical Schema

5. Define your Target model with the required Logical Schema defined above .

6. Next Step is to define the columns and make sure all the data types are defined as string even for dates.

7. Comparing to the source , I have defined Target as with Two columns region_id and region_name with data type string.

8. Next step is to define the Properties of the File to be populated.

( Note – The most important part of File property is how  we define  them i.e  how the Records are stored and how ODI can categorize Columns while reading from the File ]

9. Next step is to define the Interface , since our target is a File we have to check mark the option " Staging area different from target " and selecting either the source or other schema which you want to use as the Staging schema , but preferably Source Schema.

10. Select the required LKM if the staging is different from the Source and " IKM Sql to File Append" . Apply and Execute .

11. Enable the option " GENERATE_HEADER " if you wish to populate the data with Headers.

12. Finally your file is created with the data and headers in it.

[Tip : – If you wish not to create a new data server for File Technology , you can use the default data server " FILE GENERIC " , the path is to store and create file under FILE_GENERIC  is  ‘ ODI_HOMEoracledidemofile ‘ . ]

September 6, 2009
by kdevendr
18 Comments

Categories: ODI

Single Post View


Scheduling using ODI Scheduler

Start the agent using agent scheduler or agent service

Scheduling process

Under the  scenario , right click on scheduling , click on " Insert scheduling "

Define all the scheduling parameter and the logical agent and log level. Set the Execution mode and Execution time and period. For more choice look for other tabs.Finally apply your setting and click ok.

To apply Scheduling , Go to  Topology – > Logical Architecture – > Logical Agent

Right click on Logical Agent and Click on the " Update Scheduling " .

[ Note: Make sure the agent is running  as ODI scheduler needs the agent  for its functionality . ]

September 6, 2009
by kdevendr
8 Comments

Categories: Common Errors , ODI

Single Post View


Exception – getobjectname schema

This error occurs when you have multiple schemas but no default schema defined.

Go to Topology – > Physical Architecture – >  Technology – > Data Server .

Edit the physical server that you want to be the default and under the Definition, there is a  check box "Default" ,check mark it and rerun the Interface.

Mark the correct physical schema to default and rerun the Interface.

September 6, 2009
by Cezar Santos
14 Comments

Categories: How to , ODI , Tips and Tricks

Tags: , , ,

Single Post View


How to create a Temp Table in ODI Interface (Yellow Interface)

  • Define the Interface Name , optimization context and select the proper schema for staging Area different from the Target

  • In the Diagram Tab, Drag your source in to the Source side
  • In the Target Data store Click on the Untitled area and you can see in the properties area Name tab , Context and Temporary Data store Location
  • Type in the Target Temp table name you wish to create in the Name tab
  • Leave the context as it is unless you want specifically to run only for one context
  • Select the Work schema for Temporary Data store Location unless you wish to create in the Main Database or Schema.
  • To create copy of the entire table as the source, Right click and select Add to target.
  • For particular selected columns, Right click particular columns and select Add to Target and only those particular columns will be added to the target.
  • Modify the Data type for the target Database and also the column name ( if required ) . Verify the Column name and the Execution area i.e ( Source , Staging area or Target )
  • In the Flow tab, Select the appropriate IKM and put the Flow Control to be No and Create Targ Table to be Yes , so that ODI can create the table before loading in Data or Work schema as defined in step 6
  • Run the Interface and Check for Errors .If all fine you should see the table created in the Schema selected (in step 1) with data loaded. Go to the required schema check for the table and data .
  • when you create Temp table using ODI ,  you won’t see the option of Data to see the data directly in the Interface
  • Temp Interface are marked by a Yellow Color Icon unlike Blue

  • To use this Temporary table, just drag and drop the interface as the Source for other Interfaces. You don’t need to do the Selective Reverse of the temporary data store.