<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Transformation: Source Lookup - Oracle ROWID in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Transformation-Source-Lookup-Oracle-ROWID/ta-p/1805170</link>
    <description>&lt;H4&gt;Environment&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Replicate&lt;/LI&gt;
&lt;LI&gt;Table/Field level transformation&lt;/LI&gt;
&lt;/UL&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;H3&gt;Field Transformation&lt;/H3&gt;
&lt;P&gt;On my Source &amp;nbsp;table from Oracle, I am using the source lookup function under Data Enrichment in order to retrieve the Oracle ROWID field value.&amp;nbsp; Not all fields are logged by oracle into the Redo Logs. In the case of ROWID we will use a source lookup function to query the source table and retrieve the field value, putting it&amp;nbsp; into the Add Column that we defined and called ROWID. This source lookup function is documented in the replicate user guide and the on-line help.&lt;/P&gt;
&lt;H4&gt;The general form of the function is as follows:&lt;/H4&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;source_lookup(TTL,'SCHM','TBL','EXP','COND',COND_PARAMS)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H4&gt;&lt;BR /&gt;For this example in am doing the lookup into the Employees table:&lt;/H4&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;source_lookup('&lt;SPAN&gt;NO_CACHING&lt;/SPAN&gt;','HR','EMPLOYEES','ROWID','EMPLOYEE_ID=:1',$EMPLOYEE_ID)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;NO_CACHING is important to ensure it keeps changing for each value and doesn’t re-use values&lt;BR /&gt;HR is the schema in oracle&lt;BR /&gt;EMPLOYEES is the table&lt;BR /&gt;ROWID is what I want returned&lt;BR /&gt;EMPLOYEE_ID=:1&amp;nbsp;is the predicate for the lookup&amp;nbsp;&lt;BR /&gt;$EMPLOYEE_ID is the value from the redo log that we are using in the predicate in place of :1&lt;/P&gt;
&lt;P&gt;NOTE: If the source lookup needed more than one field in the key then:&amp;nbsp;&lt;BR /&gt;(Multiple variables would look like: 'EMPLOYEE_ID=:1 AND DEPARTMENT_ID=:2) &lt;BR /&gt;$EMPLOYEE_ID, $DEPARTMENT_ID (in this example we are using field values that the task has read from the redo log file.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt; That the lookup may have a performance implication and will need to be tested to see if it meets all of your latency criteria. Please also note that the Oracle ROWID is not guaranteed to persist. Traditional Oracle ROWID's can change&amp;nbsp;if a table is quiesced or rebuilt with dbms_redefinition.&lt;/P&gt;
&lt;P&gt;This expression is created for the Add Column&amp;nbsp;transformation ROWID as seen in the screen shot below.&lt;/P&gt;
&lt;DIV id="tinyMceEditorMichael_Litz_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Transformation Screen shot" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54255i0BCEC3068F5EED2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="ROWID.jpg" alt="Transformation Screen shot" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Transformation Screen shot&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt; Unfortunately data enrichment function can not be tested on the screen, they must be saved and the task run for the transformation to be tested.&lt;/P&gt;
&lt;P&gt;The screen shot below shows the target table with the ROWID field after the task has run.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Target Table with ROWID field" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54256i41F1ABDA80909CAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Oracle Rowid Target Table.png" alt="Target Table with ROWID field" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Target Table with ROWID field&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Related Content&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 12:52:04 GMT</pubDate>
    <dc:creator>Michael_Litz</dc:creator>
    <dc:date>2024-06-04T12:52:04Z</dc:date>
    <item>
      <title>Transformation: Source Lookup - Oracle ROWID</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Transformation-Source-Lookup-Oracle-ROWID/ta-p/1805170</link>
      <description>&lt;P&gt;Transformation, Data Enrichment, Source Lookup, Oracle, ROWID&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 12:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Transformation-Source-Lookup-Oracle-ROWID/ta-p/1805170</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2024-06-04T12:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Transformation: Source Lookup - Oracle ROWID</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Transformation-Source-Lookup-Oracle-ROWID/tac-p/2509570#M15523</link>
      <description>&lt;P&gt;I was told that Qlik Replicate does not support custom queries joining two tables. However, can a source lookup be used joining two tables applying a filter condition.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Pranathi&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 16:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Transformation-Source-Lookup-Oracle-ROWID/tac-p/2509570#M15523</guid>
      <dc:creator>unay</dc:creator>
      <dc:date>2025-03-12T16:04:40Z</dc:date>
    </item>
  </channel>
</rss>

