<?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>topic Re: Oracle block execution in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330100#M99196</link>
    <description>I had a similar problem and solved it with a user component tSQLScriptParser. This component will extract 3 statements from your script and provide the SQL as return value STATEMENT_SQL.&lt;BR /&gt;I would do this:&lt;BR /&gt;tOracleConnection (autocommit=false)-&amp;gt; tSQLScriptParser -(iterate)-&amp;gt;tOracleRow (using the tOracleConnection)&lt;BR /&gt;From tSQLScriptParser - (OnSubjobOk)-&amp;gt; tOracleCommit&lt;BR /&gt;The tOracleRow gets as SQL this: ((String)globalMap.get("tSQLScriptParser_1_STATEMENT_SQL")) without any "&lt;BR /&gt;The tSQLScriptParser is a user component and available via Talend Exchange.&lt;BR /&gt;&lt;A href="http://www.talendforge.org/exchange/index.php?eid=724&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/exchange/index.php?eid=724&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1&lt;/A&gt;&lt;BR /&gt;This component recognize blocks and also the / as end of complex statements.</description>
    <pubDate>Sat, 20 Jul 2013 20:50:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-20T20:50:54Z</dc:date>
    <item>
      <title>Oracle block execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330097#M99193</link>
      <description>Hy everybody,
&lt;BR /&gt;I have the following situation :
&lt;BR /&gt; I am trying to replicate data in real-time from ORACLE -&amp;gt; VERTICA using data extracted with oracle log miner packages and Talend as the job manager.
&lt;BR /&gt; So i am creating a dynamic script every 10 minutes and i need to execute it using Talend tools.
&lt;BR /&gt;The script looks like this :
&lt;BR /&gt;#########################################################################
&lt;BR /&gt;begin
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_2_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_3_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_4_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_5_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_6_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_7_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.ADD_LOGFILE (LogFileName =&amp;gt; '/u01/app/oracle/product/11.2.0/xe/dbs/arch1_8_820601368.dbf',options =&amp;gt; DBMS_LOGMNR.NEW);
&lt;BR /&gt; DBMS_LOGMNR.START_LOGMNR (DictFileName =&amp;gt; '/tmp/utl/dictionary.ora');
&lt;BR /&gt; end;
&lt;BR /&gt;/ 
&lt;BR /&gt;create table stage as SELECT * FROM v$logmnr_contents;
&lt;BR /&gt;begin 
&lt;BR /&gt;DBMS_LOGMNR.END_LOGMNR();
&lt;BR /&gt;end;
&lt;BR /&gt;/
&lt;BR /&gt;#########################################################################
&lt;BR /&gt;Just need to say that all of this must be done in one session , otherwise the log miner will not work!!
&lt;BR /&gt;How can i run this block of code using Talend tools !!!
&lt;BR /&gt;Thx all.</description>
      <pubDate>Sat, 16 Nov 2024 11:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330097#M99193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle block execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330098#M99194</link>
      <description>Hi,&lt;BR /&gt;You can do only one plsql block, try to do all in one block:&lt;BR /&gt;DECLARE&lt;BR /&gt;BEGIN&lt;BR /&gt;......&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;END</description>
      <pubDate>Thu, 18 Jul 2013 09:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330098#M99194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-18T09:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle block execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330099#M99195</link>
      <description>The problem is that  the process is required to run in one oracle session!! &lt;BR /&gt;So and i can not query the data createt inside the pl/block</description>
      <pubDate>Fri, 19 Jul 2013 16:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330099#M99195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-19T16:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle block execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330100#M99196</link>
      <description>I had a similar problem and solved it with a user component tSQLScriptParser. This component will extract 3 statements from your script and provide the SQL as return value STATEMENT_SQL.&lt;BR /&gt;I would do this:&lt;BR /&gt;tOracleConnection (autocommit=false)-&amp;gt; tSQLScriptParser -(iterate)-&amp;gt;tOracleRow (using the tOracleConnection)&lt;BR /&gt;From tSQLScriptParser - (OnSubjobOk)-&amp;gt; tOracleCommit&lt;BR /&gt;The tOracleRow gets as SQL this: ((String)globalMap.get("tSQLScriptParser_1_STATEMENT_SQL")) without any "&lt;BR /&gt;The tSQLScriptParser is a user component and available via Talend Exchange.&lt;BR /&gt;&lt;A href="http://www.talendforge.org/exchange/index.php?eid=724&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/exchange/index.php?eid=724&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1&lt;/A&gt;&lt;BR /&gt;This component recognize blocks and also the / as end of complex statements.</description>
      <pubDate>Sat, 20 Jul 2013 20:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330100#M99196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-20T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle block execution</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330101#M99197</link>
      <description>Hi,
&lt;BR /&gt;I am experiencing the same issue with tOracleRow component.
&lt;BR /&gt;I would like to execute a pl/sql block.
&lt;BR /&gt;But Talend seems not execute the block.
&lt;BR /&gt;No errors are issued.
&lt;BR /&gt;Here what I wrote in my tOracle component:
&lt;BR /&gt;
&lt;PRE&gt;"&lt;BR /&gt;BEGIN&lt;BR /&gt;&amp;nbsp; FOR c IN&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (SELECT t.table_name, c.column_name&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM user_tables t, user_tab_columns c&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE c.table_name = t.table_name&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND data_type='VARCHAR2'&lt;BR /&gt;		AND lower (t.table_name) in('intervention' )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; LOOP&lt;BR /&gt;&amp;nbsp; &amp;nbsp; execute immediate(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'UPDATE '||c.table_name||&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ' SET '||c.column_name||' = TRIM('||c.column_name||') WHERE '||&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.column_name||' &amp;lt;&amp;gt; TRIM('||c.column_name||') OR ('||&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.column_name||' IS NOT NULL AND TRIM('||c.column_name||') IS NULL)'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&amp;nbsp;&lt;BR /&gt;&amp;nbsp; END LOOP;&lt;BR /&gt;END;&lt;BR /&gt;"&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 15:07:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Oracle-block-execution/m-p/2330101#M99197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T15:07:03Z</dc:date>
    </item>
  </channel>
</rss>

