This post is applicable only for OBIEE 7.9.5 applications configured to run with data movement type as UNICODE. After the recent upgrade to 7.9.5 (Informatica 8.1), in development, some ETLs (Bank, GL Account, Employee and User dimensions) started failing with either Unique constraint error or duplicate keys found. After looking at data, it was clear that OBIEE is getting loaded with duplicate values in INTEGRATION_ID column causing duplicate keys found error while creating unique index, which is a composite key on columns - DATASOURCE_NUM_ID, INTEGRATION_ID and EFFECTIVE_FROM_DT.
When I exported the source data and stage table data to a spreadsheet and started ro by row comparison with VLOOKUPs in Excel, it was clear that Informatica while loading stage table, it either truncated a character in INTEGRATION_ID or added some junk characters in some VARCHAR columns. Because the truncated values in INTEGRATION_ID matched already existing values, duplicate keys found error was thrown.
After raising with support and spending some time on it, I figured that it is Default Buffer Block Size setting in Informatica that is causing the issue. Defaukt Buffer Block size is configured as 1280000 in all of the ETL sessions that are failing. I reverted the value to 128000 and the sessions started to run with no truncation and no junk characters.
Informatica support directed me to the Performance tuning guide, which has details on 2 very important session level parameters (Default Buffer Block Size and DTM Buffer Size), confuguring which without understanding the implications can lead to data loss without even realizing the problem. I am putting dowm the explanation in brief.
Informatica Integration Service process starts the Data Transformation Manager (DTM) when you start a session and DTM allocates buffer memory to the session at runtime based on the DTM Buffer Size setting in the session properties. The DTM divides the memory into buffer blocks as configured in the Default Buffer Block Size setting in the session properties. The reader, transformation, and writer threads use buffer blocks to move data from sources to targets. The buffer block size should be larger than the precision for the largest row of data in a source or target.
The Integration Service allocates at least 2 buffer blocks for each source and target partition. Use the following calculation to determine buffer block requirements:
[(total number of sources + total number of targets)* 2] = (session buffer blocks)
Session Buffer Blocks = No. of Partitions * (DTM Buffer Size / Buffer Block Size)
In OOB ETLs, Buffer Block Size is increased to 1280000 leaving DTM Buffer Size as 32000000. Session Buffer Blocks = (32000000/1280000), which is 25 blocks and that seem to be not enough to move data from source to taget, which case it should have failed rather than truncating characters. But, my first test with 128000 for Default Buffer Block size worked, which resulted 250 Memory Blocks and this seem good enough to move data. I was not sure why this fixed but support directed me to right document.
Here is some additional information that may be useful.
You configure buffer memory settings by adjusting the following session parameters:
DTM Buffer Size. The DTM buffer size specifies the amount of buffer memory the Integration Service uses when the DTM processes a session. Configure the DTM buffer size on the Properties tab in the session properties.
Default Buffer Block Size. The buffer block size specifies the amount of buffer memory used to move a block of data from the source to the target. Configure the buffer block size on the Config Object tab in the session properties.
Refer to Power Center Workflow Administration Guide or Performance Tuning Guide for more detailed explanation.
Friday, January 16, 2009
Data truncation with OBIEE Applications 7.9.5 OOB ETLs
Friday, October 31, 2008
Registering Informatica 8.1.1 Integration Service in DAC
Registering Informatica Integration service in DAC took a lot of time in the evening the other day. The documentation says that the ServerPort variable in Custom Properties in Informatica Admin Console will be the port on which Informatica Integration service will listen to. Refer to section 4.7.3 in Oracle® Business Intelligence Applications Fusion Edition Installation and Configuration Guide Release 7.9.5 document. But, after creating ServerPort variable with value 4006 as a custom property in Repository properties did not help. lsof -i|grep 4006 on Solaris returned nothing on Solaris, which indicates that the port is not in use. After shutting down and restarting of Informatica services multiple times, I thought I missed something in documentation. I was able to connect to Integration serviec and Repository service with pmrep and pmcmd respectively from the command prompt on the machine where DAC client is running.
After lot of unsucessful attempts, I looked at all of the ports in use by the Solaris user and 6009 stood out to be something of interest. Boom!! Here I go. DAC threw a message "connection successful but passwords not verified" when the port changed to 6009 from 4006. I do not think we ever configured 6009 anywhere during or post install of Informatica 8.1.1 OEM. I am wondering what if we want to create another Informatica integration service on the same box with a different user. I will post the answer as I come out of that situation.
Here is the way to fix the Port issue with Informatica Integration Service
After going through the documentation once more, it is clear that the custom property should be created in Informatica Integration Service properties NOT on the repository properties. I restarted Infaservices today and the port is different now. So, Informatica is assigning different port each time for Integration service. After adding the ServerPort variable with value as 6010 in Informatica Integration service custom properties, Informatica integration service is always running on the static port(6010). Now I am confident that we can run multiple Informatica Integration services on a Solaris machine, if required.
Tuesday, July 15, 2008
Type-II SCD Logic in OBIEE OOB ETLs
I have been thinking about blogging about evolution of Type-II SCD in OBIEE Applications in different versions of Applications for quite sometime now but haven't had all the time. With previous versions of Analytics applications, our ability was very limited in handling SCD logic. I remember having a requirement in one of my earlier implementations to look at capturing changes as the change occur in source (SIEBEL) system, which means tracking history of all changes that occur even during the day. After much of deliberations, customer thought it is not worth putting all that effort to solve a business problem that did not exist. Let me explain what the business problem we were trying to solve.
In a contact center, team leads and team managers are changed in the source system during the work day very often than anybody can imagine. We had ETLs running at top of the half hour to gather the telephony data at CSR level and most reports roll up the data to team lead and team manager level in SIEBEL Analytics. We proposed to make the position hierarchy dimension a Type-II SCD but when the logic of SCD was explained, IT management raised that the SCD should capture intra-day changes as well. I started to put some effort back then to come up with some custom SCD logic that would accomplish this. But, business dropped that with an argument that the CSRs do not report to more than one Team Lead on any day thouh the changes may be done in the system during the work day.
I have reviewed 7.9.4 ETLs and one of the things that impressed me most is the SCD logic and how it has been implemented. It definitely deserves a post and credits to Engineering team for design and build of this logic in Informatica. I am not going to write all the logic down here but will mention at high level what is happenning in ETLs with respect to TYpe2 SCD. This may be helpful to those folks, who haven't had a chance to look at 7.9.X apps as yet. In the latest OBIEE Apps, ETL_PROC_WID is not a constant anymore. The definition of ETL_PROC_WID column is more explainable now than before. ETL_PROC_WID is different in each ETL run and is incremented by 1 for each ETL run. OBIEE ETLs leveraged this column in handling failure cases. Though there are multiple exceptions handled, when it comes to Type-II SCD logic, OOB ETLs evaluates 2 ports;
1) SYSTEM_COLLS_DIFF checks for any changes in date (Audit) columns in Stage and Target tables and marks it 'Y', if there is a change in values of all the audit columns between satge and target table.
2) TYPE2_COLLS_DIFF checks all the columns for which the history of changes need to be tracked and mark it 'Y', if there is a change in values of all the columns between stage and target table.
Once the above ports are evaluated, UPDATE_FLG is evaluated whether is an update or SCD or insert or nothing to do. Source System Change Date is one column that is compared while the record is inserted with the Effective From Date of the target record while the SCD record in inserted. I had used ETL run date so far for populating SCD Start Date and SCD End Date. Source system change date will help because lot of systems are modified after the fact and they would like to go with either change date or a date that the source system captures as effective from date. OO ETLs have another mapping to update the Effective To Date of the history record for all the records that are modified for Type2.
I am pasting a small graphic that explains the difference in older reeases and new release of OBIEE Applications.
