<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Kirtan Desai</title>
	<link>http://kirtandesai.com/write</link>
	<description></description>
	<pubDate>Sun, 25 May 2008 16:39:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>
	<language>en</language>
			<item>
		<title>been busy&#8230;</title>
		<link>http://kirtandesai.com/write/2008/05/25/been-busy/</link>
		<comments>http://kirtandesai.com/write/2008/05/25/been-busy/#comments</comments>
		<pubDate>Sun, 25 May 2008 16:39:52 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>BLOG</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2008/05/25/been-busy/</guid>
		<description><![CDATA[I have been busy with the new job and lot of other things. I need to start posting again.

]]></description>
			<content:encoded><![CDATA[<p>I have been busy with the new job and lot of other things. I need to start posting again.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2008/05/25/been-busy/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Informatica Issue</title>
		<link>http://kirtandesai.com/write/2007/12/11/informatica-issue-2/</link>
		<comments>http://kirtandesai.com/write/2007/12/11/informatica-issue-2/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 02:58:49 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/12/11/informatica-issue-2/</guid>
		<description><![CDATA[I got this question as a comment.
Hi,
In informatica one of our mappings are using oracle target table. Daily it runs in production and complete in 10 min. but suddenly its just running and running. we stopped it forcely. what could be the potential cause for its continuous run?
Thanks.
There could be many reasons for this. One [...]]]></description>
			<content:encoded><![CDATA[<p>I got this question as a comment.</p>
<p><em>Hi,</em></p>
<p><em>In informatica one of our mappings are using oracle target table. Daily it runs in production and complete in 10 min. but suddenly its just running and running. we stopped it forcely. what could be the potential cause for its continuous run?</em></p>
<p><em>Thanks.</em></p>
<p>There could be many reasons for this. One that comes to my mind is database statistics. When was the last time you gathered stats? The other reasons could be duplicate keys on the target table or if you have setup your session to collect all kinds of stats and data in the logs (it would just take longer but not a whole lot) or huge lookup source with no calculated cache settings&#8230;.I could go on with this but it would be useless. I would like you to provide some information. Tell me about the version, the OS, the DB version, and all other architectural details. And tell me a bit about your mapping as well. If you want, go ahead and paste the session log here. I will take a look at it, see if I can find the issue and then remove it from the site.</p>
<p>Kirtan
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/12/11/informatica-issue-2/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Oracle VM.</title>
		<link>http://kirtandesai.com/write/2007/11/15/oracle-vm/</link>
		<comments>http://kirtandesai.com/write/2007/11/15/oracle-vm/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 02:44:55 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Oracle</category>
	<category>BLOG</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/11/15/oracle-vm-is-not-for-me/</guid>
		<description><![CDATA[Oracle just announced the release of Oracle Virtualization software, Oracle VM. It sounds all great and fun but it needs two machines, one for installing the server and another for managing it. I don&#8217;t have two machines for this. I have two machines but this approach seems like a little too much effort for &#8220;virtualization&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle just announced the release of Oracle Virtualization software, Oracle VM. It sounds all great and fun but it needs two machines, one for installing the server and another for managing it. I don&#8217;t have two machines for this. I have two machines but this approach seems like a little too much effort for &#8220;virtualization&#8221;. How does this make it simple. I am sticking with VMWare for now.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/11/15/oracle-vm/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Oracle timestamp in Informatica</title>
		<link>http://kirtandesai.com/write/2007/09/10/oracle-timestamp/</link>
		<comments>http://kirtandesai.com/write/2007/09/10/oracle-timestamp/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 19:41:54 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Oracle</category>
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/09/10/oracle-timestamp/</guid>
		<description><![CDATA[To extract values from an oracle table column of timestamp datatype, you need to convert it to a character datatype since the Oracle Timestamp datatype is not currently supported by PowerCenter. To extract the value do the following.
Use SQL override and function to_char, provided by oracle, to convert the values of a field to character [...]]]></description>
			<content:encoded><![CDATA[<p>To extract values from an oracle table column of timestamp datatype, you need to convert it to a character datatype since the Oracle Timestamp datatype is not currently supported by PowerCenter. To extract the value do the following.</p>
<li>Use SQL override and function to_char, provided by oracle, to convert the values of a field to character type before bringing it into PowerCenter mapping. For example,SQL> create table tst1 (tmstmp timestamp);Table created.
<p>SQL> insert into tst1 values (current_timestamp);</p>
<p>1 row created.</p>
<p>SQL> /</p>
<p>1 row created.</p>
<p>SQL> /</p>
<p>1 row created.</p>
<p>SQL> /</p>
<p>1 row created.</p>
<p>SQL> /</p>
<p>1 row created.</p>
<p>SQL> commit;</p>
<p>Commit complete.</p>
<p>SQL> select * from tst1;</p>
<p>TMSTMP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
10-SEP-07 02.44.14.807930 PM<br />
10-SEP-07 02.44.16.700373 PM<br />
10-SEP-07 02.44.17.357597 PM<br />
10-SEP-07 02.44.18.163876 PM<br />
10-SEP-07 02.44.18.685926 PM</p>
<p>SQL> select tmstmp, to_char(tmstmp,&#8217;YYYY-MM-DD HH:MM:SS.FF6&#8242;) as CHAR_TMSTMP from tst1;</p>
<p>TMSTMP                        CHAR_TMSTMP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
10-SEP-07 02.44.14.807930 PM  2007-09-10 02:09:14.807930<br />
10-SEP-07 02.44.16.700373 PM  2007-09-10 02:09:16.700373<br />
10-SEP-07 02.44.17.357597 PM  2007-09-10 02:09:17.357597<br />
10-SEP-07 02.44.18.163876 PM  2007-09-10 02:09:18.163876<br />
10-SEP-07 02.44.18.685926 PM  2007-09-10 02:09:18.685926</p>
<p>The resultant column CHAR_TMSTMP in the output of the query is now ready to be extracted in a mapping.</li>
<li>IMPORTANT thing to remember here is to make sure that the column for the timestamp value in the mapping, is defined as String(26).</li>
<p>Hope this helps&#8230;<br />
Kirtan
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/09/10/oracle-timestamp/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>nvarchar2 &#038; varchar2</title>
		<link>http://kirtandesai.com/write/2007/09/09/nvarchar2-varchar2/</link>
		<comments>http://kirtandesai.com/write/2007/09/09/nvarchar2-varchar2/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 18:28:55 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/09/10/nvarchar2-varchar2/</guid>
		<description><![CDATA[Informatica imports all VARCHAR2 fields as nVARCHAR2. This is a big deal. Especially when you are using update strategy to perform update-else-insert operations on target columns that are of VARCHAR2 datatype. One could expect noticable performance gain after converting all target column definitions for VARCHAR2 columns in Informatica.
Kirtan

]]></description>
			<content:encoded><![CDATA[<p>Informatica imports all VARCHAR2 fields as nVARCHAR2. This is a big deal. Especially when you are using update strategy to perform update-else-insert operations on target columns that are of VARCHAR2 datatype. One could expect noticable performance gain after converting all target column definitions for VARCHAR2 columns in Informatica.</p>
<p>Kirtan
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/09/09/nvarchar2-varchar2/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Cache</title>
		<link>http://kirtandesai.com/write/2007/09/08/cache/</link>
		<comments>http://kirtandesai.com/write/2007/09/08/cache/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 18:22:11 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/09/10/cache/</guid>
		<description><![CDATA[Informatica uses cache files for various transformation wherever it needs to store data throughout the life of the mapping. For all these transformations Informatica uses Index Cache and Data Cache. This is done using either memory alone or using memory and physical disks. When the cache settings are calculated correctly and enough room is provided, [...]]]></description>
			<content:encoded><![CDATA[<p>Informatica uses cache files for various transformation wherever it needs to store data throughout the life of the mapping. For all these transformations Informatica uses Index Cache and Data Cache. This is done using either memory alone or using memory and physical disks. When the cache settings are calculated correctly and enough room is provided, Informatica PowerCenter stores data in memory. In cases where not enough size is provided for index and a data cache, Informatica stores as much as it can in the memory and then starts creating cache files on the physical disks. For example, if your cache file was supposed to have 500,000 lines but you only provided room for 100,000 lines through your cache settings, Informatica will write rest (400,000) of the lines into cache files on physical disks. I would think the size of these files depends on the kind of platform you are on.</p>
<p>In case of Lookup Transformation, Informatica also sorts the data by condition ports sequence. In cases where lookup cache is needed to be written to the physical disk, this sorting operation itself can become time consuming. But this could be advantageous if you can select the rows to be processed from the source qualifier in the same sorted order as the lookup condition ports sequence. So, if cache data for a particular key is in memory, then most probably the data for the adjacent keys will also be in memory. In this case, the time that lookup transformation would take to lookup data would keep increasing for each row as it would have to keep digging deeper in the file for each new row. Eventhough it sounds bad, it&#8217;s not it&#8217;s better than having data in random order. With appropriate indexes on the source tables, this operation could become very fast.</p>
<p>Wherever possible, use sorted data for these transformations. It is advisable to count appropriate amount of cache settings for each transformation that uses caching. Also one must consult the DBAs to come up with a good indexing strategy for all source tables.</p>
<p>Transformations that use caching for their process are&#8230;</p>
<p>Lookup Tranformation<br />
Joiner Tranformation<br />
Aggregator Tranformation<br />
Rank Tranformation<br />
Sorter Tranformation
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/09/08/cache/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Informatica - Seq. Gen. performance issue</title>
		<link>http://kirtandesai.com/write/2007/09/06/informatica-seq-gen-performance-issue/</link>
		<comments>http://kirtandesai.com/write/2007/09/06/informatica-seq-gen-performance-issue/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 05:11:57 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/09/06/informatica-seq-gen-performance-issue/</guid>
		<description><![CDATA[Someone emailed me yesterday with a &#8220;never heard of&#8221;, at least for me, Informatica performance issue. The message said that they only have a sequence generator that is adding something to the data in the mapping. Everything else is coming straight from the source. The session took less than a minute to execute without a [...]]]></description>
			<content:encoded><![CDATA[<p>Someone emailed me yesterday with a &#8220;never heard of&#8221;, at least for me, Informatica performance issue. The message said that they only have a sequence generator that is adding something to the data in the mapping. Everything else is coming straight from the source. The session took less than a minute to execute without a sequence generator and seven minutes with a sequence generator. It sounded a little odd because normally you would think that seq. gen. doesn&#8217;t make too much impact on the performance. But after a little investigation and a screenshot of the transformation properties we found out that a setting called &#8220;Number of Cached Values&#8221; was causing the issue. The value for it was set to 1 instead of recommended 0 (zero) or some large number. Setting this number to a small value could and would cause some issues for you. This setting is useful when there is a need to keep a unique set of values across mappings that share the same sequence generator. Usually these mappings are ran in parallel and the targets are same across all mappings that use this sequence generator.</p>
<p>This setting tells Informatica about the number of values that are stored in the repository when the session is started. The way Informatica processes this value is the key. Every time during the life of a session when this value is reached, Informatica queries the repository to get the next value for the Seq. Generator. So if you have this value set to 1, Informatica will query the repository database for every row that asks for a value from this transformation. And as you can imagine, this would definitely add some time to your the life of a session run.</p>
<p>If you set this number to some higher value like 15000, Informatica will query the repository after every 15000 rows. That may not necessarily be a bad thing. It would not have a major impact on total execution time. If the number is set to zero this setting would no more be a factor. Because then Informatica would NOT store the value of in the repository. Instead, it would be kept in the session memory.</p>
<p>The sequence number is kept on the server if the value is set to zero. In all other cases where it is set to be 1 or greater, the value is stored in the repository and the Informatica server process retrieves it from the database.</p>
<p>hope this helps&#8230;</p>
<p>Kirtan
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/09/06/informatica-seq-gen-performance-issue/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Pivot Query</title>
		<link>http://kirtandesai.com/write/2007/09/05/pivot-query/</link>
		<comments>http://kirtandesai.com/write/2007/09/05/pivot-query/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 09:46:20 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>Oracle</category>
	<category>Informatica</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/02/20/pivot-query/</guid>
		<description><![CDATA[So how to pivot data in a table?
I was asked about this by someone at work today. Let&#8217;s say you have a table that looks like following. I have included create and insert statements so that you can see it and understand it yourself.
Create table t1 (a number, b number);
insert into t1 values (1,1);
insert into [...]]]></description>
			<content:encoded><![CDATA[<p>So how to pivot data in a table?<br />
I was asked about this by someone at work today. Let&#8217;s say you have a table that looks like following. I have included create and insert statements so that you can see it and understand it yourself.</p>
<p><code>Create table t1 (a number, b number);</code></p>
<p><code>insert into t1 values (1,1);<br />
insert into t1 values (1,2);<br />
insert into t1 values (1,3);<br />
insert into t1 values (2,1);<br />
insert into t1 values (2,2);<br />
insert into t1 values (2,3);<br />
insert into t1 values (3,1);<br />
insert into t1 values (3,2);<br />
insert into t1 values (3,3);</code></p>
<p>select * from t1 order by 1,2;</p>
<p>####<br />
(A hint aside: You must specify the order in which you want the data to be back. It is completely wrong to say that oracle will return the data in order it was inserted.)<br />
####</p>
<p><code>A B<br />
----- ------<br />
1 1<br />
1 2<br />
1 3<br />
2 1<br />
2 2<br />
2 3<br />
3 1<br />
3 2<br />
3 3 </code></p>
<p>Now, let&#8217;s say you want to retrieve all the records from table t1 in a fashion where all the values in column B that belong to the group Column A should be shown side by side. Something like</p>
<p><code>A Val1 Val2 Val3<br />
-- ---- ---- ----<br />
1 1 2 3</code></p>
<p>One way would be to write a procedural code that stores different values of a group in an array or a series of variables and then displays them on screen or returns them to the calling program.</p>
<p>Or</p>
<p>You could just write a simple SQL statement that does it for you. You could write a piece of code that looks like this&#8230;</p>
<p><code>select<br />
a<br />
,max(decode(b,1,b,null)) col1<br />
,max(decode(b,2,b,null)) col2<br />
,max(decode(b,3,b,null)) col3<br />
from t1<br />
group by a;</code></p>
<p>A COL1 COL2 COL3<br />
&#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;-<br />
1 1 2 3<br />
2 1 2 3<br />
3 1 2 3</p>
<p>3 rows selected</p>
<p>&#8230; and you won&#8217;t have to worry about supporting an object such as a function or a procedure.</p>
<p>What if you had null values in one of the columns.</p>
<p><code>update t1 set b=null where a=2 and b=2;</code></p>
<p>One row updated</p>
<p>select<br />
a<br />
,max(decode(b,1,b,null)) col1<br />
,max(decode(b,2,b,null)) col2<br />
,max(decode(b,3,b,null)) col3<br />
from t1<br />
group by a;</p>
<p>A COL1 COL2 COL3<br />
&#8212;&#8211; &#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;-<br />
1 1 2 3<br />
2 1    3<br />
3 1 2 3</p>
<p>3 rows selected</p>
<p>There are many ways to write pivot queries. This is probably the easiest way of doing it.</p>
<p><strong>Using Informatica to perform pivot operation.</strong></p>
<p>You can use the Normalizer Transformation to generate rows out of columns. But to pivot values in rows into columns you would have to use Aggregator Transformation. You have to use the *FIRST* function to achieve this. Here is an example&#8230;</p>
<p>Suppose you have a source table with this data that is a record of monthly expenses for each of your departments. <code> create table deptexp (sales_id number(5), mon char(3), amt number(10,2));</code></p>
<p>insert into deptexp values (1,&#8217;JAN&#8217;,100);<br />
insert into deptexp values (1,&#8217;FEB&#8217;,120);<br />
insert into deptexp values (1,&#8217;MAR&#8217;,135);<br />
insert into deptexp values (2,&#8217;JAN&#8217;,110);<br />
insert into deptexp values (2,&#8217;FEB&#8217;,130);<br />
insert into deptexp values (2,&#8217;MAR&#8217;,120);<br />
Commit;</p>
<p>You want to load this data after denormalizing it into this structure.<br />
<code>create table deptexp1 (DEPT_ID number(5), JAN_AMT number(10,2), FEB_AMT number(10,2), MAR_AMT number(10,2))</code><br />
The data after our process would look like&#8230;<br />
<code>DEPT_ID   JAN_AMT   FEB_AMT   MAR_AMT<br />
1          100       120        135<br />
2          110       130        120<br />
</code><br />
Do the following to accomplish this.<br />
1. Create an Aggregator transformation with the following ports and expressions:<br />
<code>NAME	IN/OUT	EXPRESSION	GROUP BY<br />
DEPT_ID	IN	 	YES<br />
MONTH	IN	 	NO<br />
AMOUNT	IN	 	NO<br />
JAN_AMT	OUT	FIRST(AMOUNT, MONTH='JAN')<br />
FEB_AMT	OUT	FIRST(AMOUNT, MONTH='FEB')<br />
MAR_AMT	OUT	FIRST(AMOUNT, MONTH='MAR')<br />
APR_AMT	OUT	FIRST(AMOUNT, MONTH='APR')<br />
</code> 2. Connect the DEPT_ID, MONTH and the AMOUNT ports from the Source Qualifier to the Aggregator.<br />
3. Connect the JAN_AMT, FEB_AMT, MAR_AMT, etc. ports to the target.<br />
And that would do it&#8230;</p>
<p>Hope this helps&#8230;</p>
<p>Kirtan
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/09/05/pivot-query/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Windoze has evolved.</title>
		<link>http://kirtandesai.com/write/2007/08/25/windoze-has-evolved/</link>
		<comments>http://kirtandesai.com/write/2007/08/25/windoze-has-evolved/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 03:47:43 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>BLOG</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/08/25/windoze-has-evolved/</guid>
		<description><![CDATA[I have MS Windows Vista installed on my laptop. Today, I was trying to transfer some photographs from my camera to my laptop. I also had my Oracle virtual machine on Linux running on the side. And guess what I got out of nowhere. The Blue Screen of Death. It has been a while since [...]]]></description>
			<content:encoded><![CDATA[<p>I have MS Windows Vista installed on my laptop. Today, I was trying to transfer some photographs from my camera to my laptop. I also had my Oracle virtual machine on Linux running on the side. And guess what I got out of nowhere. The Blue Screen of Death. It has been a while since I have seen it. The kicker was what happened after I rebooted the machine. As the title of the post suggests, windows now knows what went wrong. I think that&#8217;s start. Give them a few more years and they will fix it for good.</p>
<p>Here are the details&#8230;<code><br />
<img src="http://kirtandesai.com/write/wp-content/themes/bravery/images/BlueScreen.jpg" /> </code></p>
<p>This was truly interesting and funny!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/08/25/windoze-has-evolved/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Move&#8230;</title>
		<link>http://kirtandesai.com/write/2007/06/25/move/</link>
		<comments>http://kirtandesai.com/write/2007/06/25/move/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 00:17:38 +0000</pubDate>
		<dc:creator>Kirtan Desai</dc:creator>
		
	<category>BLOG</category>
		<guid isPermaLink="false">http://kirtandesai.com/write/2007/06/25/move/</guid>
		<description><![CDATA[I just moved from Charlotte, NC to Houston, TX for a new job. I am giving consulting/contracting a (indefinite) rest. I don&#8217;t know if I will ever be a consultant again but for now I will be a Full-Time employee working on &#8217;our&#8217; in-house projects. Consulting was fun. I can&#8217;t complain at all.
Let&#8217;s see how houston treats us!!!

]]></description>
			<content:encoded><![CDATA[<p>I just moved from Charlotte, NC to Houston, TX for a new job. I am giving consulting/contracting a (indefinite) rest. I don&#8217;t know if I will ever be a consultant again but for now I will be a Full-Time employee working on &#8217;our&#8217; in-house projects. Consulting was fun. I can&#8217;t complain at all.</p>
<p>Let&#8217;s see how houston treats us!!!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://kirtandesai.com/write/2007/06/25/move/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
