Sunday, November 15, 2015

UNPIVOT ODI 12C

UNPIVOT ODI 12C
Scripts:
CREATE TABLE SALES(
YEAR          VARCHAR2(4) ,
Q1      NUMBER(10,2) ,
Q2     NUMBER(10,2) ,
Q3      NUMBER(10,2) ,
Q4      NUMBER(10,2) );
/
CREATE TABLE SALES_PER_QUARTER(
YEAR VARCHAR2(4),
QUARTER VARCHAR2(2),
SALES NUMBER(10,2));
/
INSERT INTO SALES VALUES('2014',23345.32,32456.41,21234.21,18324.12);
INSERT INTO SALES VALUES('2015',24324.12,34234.51,25345.18,17234.86);
COMMIT;
/

Steps:
1.       Create new Mapping
2.       Drag and drop Source datastore and target datastore
3.       Drag and drop unpivot component from component palette into Mapping editor
4.       Connect UNPIVOT and target datastore and select as below screen

5.       Click ok
6.       Now connect source datastore and UNPIVOT component and deselect the create attributes on Target
7.       Select unpivot component and go to property inspector (Ctrl+Shift+i)
8.       Select Row Locator as Quarter under – General tab
9.       Click on “+” symbol and add four columns as below


10.   Execute the mapping
11.   Output:



Completed Successfully!!!!

Saturday, November 14, 2015

Unable to Reverse Engineering Synonym in ODI 12c

Unable to Reverse Engineering Synonym in ODI 12c


Issue:
We can able to see the Synonym but after Reverse Engineer structure of datastore is empty

     Steps to be the followed to fix:

1. Check your Logical Schema and context for that model

2. Logical Schema will be available in overview tab of model and context will be available under Reverse Engineer Tab of the model

3.Go to Topology Navigator then Logical Architecture  and check logical schema for that particular context and find out your data Server (for eg: xyz.abc that means xyz is Data Server and abc is Physical Schema)

4.In the physical Architecture, go to Data server and then properties tab and add the following:
"key= includeSynonyms and value= true"

5.Now you are able to perform Reverse Engineer for synonym !!!!!!!!