Tuesday 30 June 2015

How to write sql query in ODI

There are two possible ways to use sql query as a source.
1)Using knowledge module as SQL AS SOURCE
2)Using the property as OBI_SOURCE_SQL_OVERRIDE in the knowledge module IKM BIAPPS Oracle Control Append(this KM will be available in Biaaps11.1.1.8.1,etc...).

                                      Steps to Implement this scenario using BIApps Knowledge Module
                                  --------------------------------------------------------------------------
Step 1:Create temp interface
Step2:Create a temp table with the required columns in the interface like below.
Step3:Click on flow tab-->select knowledge module as IKM BIAPPS Oracle Control Append or IKM BIAPPS Oracle Incremental Update.
Step4:Select the property as OBI_SOURCE_SQL_OVERRIDE in the knowledge module IKM BIAPPS Oracle Control Append or IKM BIAPPS Oracle Incremental Update and then write the query like below.

 Note:The number of ports in the temp table and the number of columns in the select list should be match.
Note: No need to drag any source table.Here sql query as source.
Step5:Click on save
Step6:Create a new interface and drag the temp interface in the workspace of new interface.
Step7:Drag the target datastore from the models.Click yes to auto mapping.
Step8:Click on source table then enable the property as use temporary interface as Derived table(Sub-select).

Step9:Click on flow tab then select knowledge module as IKM BIAPPS Oracle Control Append or IKM BIAPPS Oracle Incremental Update.
Step10:Click on save.
Step11:Execute the interface.

4 comments:

  1. I have a requirement for SQL override and I followed the steps mentioned here, and when I started to execute it, immediately I am getting the below error,

    com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17501: Temporary table has no column.

    Please advise, did I miss something.

    Thanks,
    Dany

    ReplyDelete
  2. Hi DanyJohn,
    check the active mapping check box,you will not get this error.

    ReplyDelete
  3. hey Srinivas,

    That works only if we use EBS as our source, what if we use target warehouse as our source?. Will that still works?

    ReplyDelete