Search code examples
oracleoracle-data-integrator

IN ODI12c mapping expression execute on source in LKM without "execute on source hint"


IN ODI12c mapping, we can use "execute on source hint" for mapping expression in order to execute expression on source. Is there a way to get mapping expression (no matter what the execution hint is) in LKM? When i use [EXPRESSION] in LKM, it get only expressions with "execute on source hint".


Solution

  • Yes, you can do it.

    You need to understand the next points. You could generate the expressions in IKM, put them into a variable and then use it in LKM.

    This can be done because the execution order is the next:

    All the KM's have sections:

    • Mapping Begin, Execution Unit Begin, Execution Unit Main, Exection Unit End, Mapping End;
    • Each of this section is executed in the next order: Mapping Begin from LKM then Mapping Begin from IKM then Execution Unit Begin from LKM then Mapping Begin from IKM and so on.
    • the last section of each KM - Mapping Cleanup - is executed as above, but only if Mapping > Physical > Check "Remove Temporary Objects on Error"

    In other words, you could do it like this:

    • declare a variable that use [EXPRESSION] in section Mapping Begin in IKM;
    • use that variable in LKM in one of the next sections (not Mapping Begin).