ODIExperts.com

The blog for Oracle Data Integrator ( ODI )

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

3 Comments

  1. if you need just sysdate from souce, i would make special Variable and refresh it prior to using it in the interface.

  2. well, what if just select your source from combo box in section “Execute On” ? it explicitly tells ODI where to send this expression.

    • Hi,

      If you do that and the mapping has no expression to any of the source columns, ODI will tell you that an error occurs and can’t execute the interface.

      Thank you for visit us!

Leave a Reply

Required fields are marked *.