Monday, October 31, 2016

BI Publisher CSV Ouptut showing number incorrectly as Exponential E+ [Solved]

Issue: We were trying to export a data set as CSV output using BI Publisher. The problem we faced is that when we take the output, One column which was having a large number (close to 16 digits) was showing up as an Exponential (E+). You can see a screenshot of the output below when opening the CSV file in a notepad.

Exponential values 

Cause: The issue is because the datatype was double. Double in BI Publisher gets changed to Exponential at time of output generation. 

Resolution: The solution is fairly simple. You go to your data model and change the column datatype to Long instead of double. 



Now try again generating the CSV output. This worked well for us. 






Friday, October 21, 2016

Banking Domain - Types of Banking - Retail, Commercial and Investment explained

Currently working in a banking domain project and being new to the domain I felt very odd among my peers. This is an attempt at learning banking domain from an Analytics/Data warehouse perspective. 

The first and foremost question to start is with what is bank and banking ? Below is how google puts it for you.


Banking is a broad term that includes any function that is performed by a bank.  

There are mainly three types of Banking
  • Retail/Consumer Bank
  • Investment Bank
  • Commercial Bank
Types of Banking - Explained


Retail or Consumer banking 

are financial institutions that deal with individual customers and SME's. 
  1. Cater to Individuals and Small/Medium enterprises. 
  2. Target audience is mostly individuals and SME's. 
  3. The amount of money involved here is comparatively less.
  4. Low risk banking model.
Investment Banking 
  1. Caters to Corporations, Government organizations and financial situtations.
  2. Target audience is corporations, financial institution
  3. The Amount of money involved is very high compared to retail banking.
  4. High risk banking model


Commercial Banking

A commercial bank primarily works with businesses
  1. Caters to individuals, small investors as well as large enterprises.
  2. Amount of money involved is high



Wednesday, October 19, 2016

OBIEE 12c Analytics Login Authenitcation Failure - NQODBC nQSError: 10018 [SOLVED]

This is one of the issues that took up a lot of time of ours.

Issue: OBIEE throws the following error when trying to login to analytics using weblogic username and password.

[OBIPS] [NOTIFICATION:1] [] [saw.securitysubsystem.checkauthentication.runimpl] [ecid: 667216e2-5177-4c25-86d2-b97ad8d56fa7-000002b2,0:1:1] [tid: 1830131456] [SI-Name: ] [IDD-Name: ] [IDD-GUID: ] [userId: ] Authentication Failure.
Odbc driver returned an error (SQLDriverConnectW).
State: 08004.  Code: 10018.  [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
 (08004)
State: HY000.  Code: 43113.  [nQSError: 43113] Message returned from OBIS.
 (HY000)
State: HY000.  Code: 43126.  [nQSError: 43126] Authentication failed: invalid user/password. (HY000)[[
File:checkauthentication.cpp
Line:1534
Location:
saw.securitysubsystem.checkauthentication.runimpl
saw.threadpool.asynclogon
saw.threads
]]


Cause: We spent a lot of time trying to find the root cause of the issue. We checked metadata schemas, boot.properties, multiple restarts, created new users and many others. The actual cause was that we have two LDAP's defined, one default weblogic LDAP and the other client LDAP server. 

The problem was that the Client LDAP server was throwing a connection error while trying to connect. The LDAP server administrator credentials were changed.  

The authentication process first checks credentials against client LDAP. Which refused the connection and hence the error,

Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.

Resolution: Update the Client LDAP providers with the latest credentials and then restart the server. 

Another work around is to change the client LDAP provider control flag to optional.

Friday, October 14, 2016

OBIEE dashboard prompt not working after passing correct data value [Solved]

Issue: OBIEE Dashboard prompt not filtering report correctly despite passing same data value.

Cause: The issue was that the actual database column say for eg: X_STATUS was having trailing spaces in database. In OBIEE when you create a dashboard prompt from this column, OBIEE automatically does a trim of the data and presents it to you.

To make things simple, imagine I am having a status 'Accepted     '  in database. Note that there are 5 trailing spaces in this column in the physical table. When you create a dashboard prompt the trailing spaces are removed and shown inside prompt. So the data in the prompt is 'Accepted' instead of  'Accepted     '. Now what happens when you prompt is that the filter passed in physical SQL would be as below

SELECT X_STATUS FROM TABLE_NAME WHERE X_STATUS='Accepted'

Now when the query reaches the table, X_STATUS column is searched for 'Accepted' instead of the original data with 5 trailing spaces. Hence a match is not found.

Resolution: Issue debugging was followed in steps:

First we checked if the dashboard prompt presentation column and report filter column was the same. It was the same.

Next we checked the physical query log and found the query passed to database. Checked for a cache metadata hit. Next we took the query and executed in database. This gave as no result as we explained earlier.

Next we did a DISTINCT on the X_STATUS column. Which gave us all distinct values, from the value we copied the Accepted data column and pasted it inside two single quotes (''). If there are spaces in the data the quotes will not end after the last letter.

The solution is to do a trim on the column in OBIEE report filter or the better solution is to do a trim on the actual physical column in Data warehouse.

Lesson Learned: The lesson learned was that when you create a dashboard prompt. OBIEE automatically does a trim function on it.

Monday, October 3, 2016

Replace NULL with Decimal 0.00 in OBIEE Pivot Table

Issue description: Replacing null code for pivot table not showing 0 with decimal places. 


Solution: As you all know the solution is very widely known to all. It is as simple as going to the corresponding measure, click on properties, go to Data Format, select custom format and paste in the following code,


#,##0;-#,##0;0

The problem with the above code is that it will not help you show decimal places, to show decimal places all you have to do is to change the code as below,

#,##0;-#,##0.00;0

note that I have replaced the second 0 as 0.00 which will make sure that data in the column will have two decimal places. Again places where there are null this doesn't apply and will show up as 0 instead of 0.00. So to correct this all you have to do is to replace the value after the second ; as 0.00 as below,

#,##0.00;-#,##0.00;0.00

This will ensure that null values are replaced by 0.00 and not 0. Also not null values will have two decimal points. 

Let us know if this worked out for you. Works well for OBIEE 12c.