Union in an ODI interface
We are working on how to implement union command in an interface
Has anyone done that.
Example: If I want to implement the following through one interface.
select * from table A
union all
select * from table B
Hi,
Hope this will help you,
Re: Union & Union All
Thanks,
Guru
Similar Messages
-
Adding UNION Dataset on EXISTING INTERFACE using SDK
hi
i am facing issue while adding UNION dataset and Mappings on Existing interface using ODI SDK.
if anyone done before, please tell me how to do it.
i am getting Unique constraint error.
thanks
nidhiHi Michael Rainey, Unique constraint error was solved, but i am getting some other issue, here is the detail.
i am trying to a add new Dataset(for Union Operation) using ODI SDK on existing Interface.
Scenario:
Dataset1 :
Source DataStore : W_PLM_LISTENTRY_PS
Column Name : ENTRYVALUE , ENTRY_ID
Filter : id=1000
Dataset 2:
Source DataStore : W_PLM_LISTENTRY_PS
Column Name : ENTRYVALUE, ENTRY_ID
Filter : id=2000
Target DataStore(Temporary):
Coloumns : Name , ENTRY_ID
Mapping between DataSet1 and Target Data Store already done in the Interface.
Now I have to add new DataSet as “Dataset2” with UNION Operator and do the mapping in to the same interface through ODI SDK.
Issue:
I have give the ODI SDK code for the below, while running that I am getting following error
Exception in thread "main" java.lang.IllegalArgumentException: Object must not be null
while debugging I found that error occur exactly when the following code was running.
interactiveHelper.performAction(new InterfaceActionOnTargetMappingSetSql("NAME","W_PLM_LISTENTRY_PS.ENTRYVALUE",newDataSet));
Already mentioned that I am using Temporary Target datastore, so changed the target column name as "ENTRYVALUE" instead of “NAME” and modified java code like
interactiveHelper.performAction(new InterfaceActionOnTargetMappingSetSql("ENTRYVALUE","W_PLM_LISTENTRY_PS.ENTRYVALUE",newDataSet));
after this change it working well.
So, it seems when ever target datastore column name not equal to source data store column name I am getting this error.
Is it a bug? or am I doing anything wrong? please let me know.
Thanks
nidhi
Code:
OdiInstance odiInstance = odiInstanceHandle.getOdiInstance();
ITransactionStatus trans = odiInstance.getTransactionManager().getTransaction(new DefaultTransactionDefinition());
String prdLineSQSILDimInterface="SIL_PLM_InternalOraganizationDimension.W_PLM_INT_ORGANIZATION_D_SQ_INT_ORG";
String sourceDataStore="W_PLM_LISTENTRY_PS";
Collection<OdiInterface> odiInterfaces = ((IOdiInterfaceFinder)odiInstanceHandle.getOdiInstance().getTransactionalEntityManager().getFinder(OdiInterface.class)).findByName(prdLineSQSILDimInterface, "BIAPPS");
OdiInterface interface=null;
for (Iterator iter = odiInterfaces.iterator() ; iter.hasNext() ; )
interface = (OdiInterface)iter.next();
OdiDataStore odiDataStore = ((IOdiDataStoreFinder) odiInstanceHandle.getOdiInstance().getTransactionalEntityManager().getFinder(OdiDataStore.class)).findByName(sourceDataStore, "BIAPPS");
InteractiveInterfaceHelperWithActions interactiveHelper = new InteractiveInterfaceHelperWithActions(interface, odiInstanceHandle.getOdiInstance(), odiInstanceHandle.getOdiInstance().getTransactionalEntityManager());
DataSet newDataSet=new DataSet(interface,"MySet");
newDataSet.setOperator("UNION");
newDataSet.setOrder(10);
interactiveHelper.performAction(new InterfaceActionAddSourceDataStore(odiDataStore, newDataSet,new AliasComputerDoubleChecker(),new ClauseImporterLazy(),new AutoMappingComputerLazy()));
interactiveHelper.performAction(new InterfaceActionOnTargetMappingSetSql("ENTRY_ID","W_PLM_LISTENTRY_PS.ENTRY_ID",newDataSet));
interactiveHelper.performAction(new InterfaceActionOnTargetMappingSetSql("NAME","W_PLM_LISTENTRY_PS.ENTRYVALUE",newDataSet));
odiInstance.getTransactionalEntityManager().persist(anInterface);
odiInstance.getTransactionManager().commit(trans);
Edited by: knidhi on Apr 18, 2013 2:40 PM
Edited by: knidhi on Apr 18, 2013 2:48 PM
Edited by: knidhi on Apr 18, 2013 2:48 PM
Edited by: knidhi on Apr 18, 2013 2:51 PM
Edited by: knidhi on Apr 18, 2013 2:54 PM -
Error when trying to execute ODI Interface
Hello,
I receive the following error when I try to execute an ODI interface. The interface contains two models trying to load a .csv file into an Oracle table. The models seem to be working and I can right click on the source file and "View Data". I have specifed LKM File To Oracle (SQLLDR), IKM Oracle Incremental Update, and CKM Oracle. But still receive this error on the fourth step of the execution "Loading - SS_0 - call sqlldr via Jython"
org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
File "<string>", line 3, in ?
OS command has signalled errors
at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Thank you for your helpAlmost...
You need the sql loader where the "OS command" will execute it means where the agent is installed (once you will execute it from an agent when at production).
AND that machine where the agent is, need to "see" the target database through the Oracle Listener (tnsnames)....
Is just like to execute a Sql Loader from you own machine, but who write the command will be ODI.
Does it make any sense to you?
Message was edited by:
Cezar Santos -
What is use of Active mapping in ODi interfaces?
hi,
What is use of active mapping in ODI interfaces ?
What are the advantages of using active mapping?
If active mapping is not used in ODI ,would it affect ODI code in some sense?
Thanks,
MaheshMaheshGx wrote:
hi,
What is use of active mapping in ODI interfaces ?This ask ODI to generate for for the mapped column . Other wise no code will be generated .
What are the advantages of using active mapping?If you want to generate code use active mapping .
If active mapping is not used in ODI ,would it affect ODI code in some sense?
It will not generate the code
Thanks,
Mahesh -
How to Comapare Row by Row in ODI Interface
Hi all
i want to Compare Record by Record from my Source Table.
Can any one Explain Logic How can i do through ODI Interface?If you want row by row processing (rather than set based) then look at using Knowledge Modules that implicitly use a cursor via the agent to load the staging table (e.g LKM SQL to SQL) or a KM that explicitly uses a cursor to load the target table (e.g IKM Incremental updata row by row).
It wont be as fast as set based though!
What do you want to do with each row? Can you load them all into the staging area and then process row by row? -
How to set a group by clause in ODI interface?
How to set a group by clause in ODI interface?
In ODI, group by method will be triggered automatically when any one of your mapping contains aggregate functions.
Thanks,
Saravanan Rajavel -
Dynamic Column Name in ODI Interface
Hi Everyone
I have a requirement to read a set of columns from source table and move the data to target table. Set of columns are decided dynamically based on parameter say PVV_PREFIX.
For example, assume the following tables
Source: Employee (OFFICE_ADDRESS1, OFFICE_ADDRESS2, OFFICE_CITY, HOME_ADDRESS1, HOME_ADDRESS2, HOME_CITY)
Target: Address(TYPE, ADDRESS1, ADDRESS2, CITY)
Now, if scenario is called PVV_PREFIX=OFFICE, then OFFICE_* columns should be mapped to target table
if scenario is called PVV_PREFIX=HOME, then HOME_* columns should be mapped to target table
In actual requirement there are more than 30 such columns. Declaring those many variables is really not practical, rather we prefer to #PVV_PREFIX + '_ADDRESS1' kind of approach. But not getting supported in ODI Interface.
Please let me know if this requirement is feasible via ODI Interface or we need to do only using ODI procedure. Thank you
Regards
PrasadPrasad,
You can do it using single interface itself but you will need to customize the KM .
Step 1. Create Interface mapping with appropriate Source to Target Mapping.
Step2. Customize KM in such a way that you add prefix PVV_PREFIX. This can done using ODI Variable or Java
Step 3. Execute and test you interface
Please let me know if you have any question in above approach . -
Basic Issue with ODI interface
Hi All,
I have a very strange problem.
I am coding my second interface in ODI.
Its very simple
Joining 4 tables ,with one filter and connect it with the target table.
The interface when executed runs fine,without any error.
But the target table doesn't get populated.
So when i check the ODI interface at every step via the Operator navigator,I get no error at any step.
step1) drop a table (this comes as a warning as no table exists)
step2) create a view(this step suceeds ,but when i check the database the view is not created)
STEP 2 is a real issue and I can't understand as to why this view is not
getting created in database,when the step completes successfully
Pls can someone suggest where should i look for ?
rgds
sI can relate to your issue.
ODI does this to me all the time.
The Operator logs show all greens and show no error, but no data makes its way to the Target.
I usually remove one mapping at a time and re-run the Interface. That helps me pin-point what might be the issue. Very frustrating. -
Regarding logical joining of two table by using ODI interface
I have a two table in database.i have to logically add them, with the help of ODI interface.which should reflect in target.
there is a smple cinario regarding ,convertion of relational table to flat file.
but how to reflect mutiple table through joining in target from source.Hi
Please correct my understan on your query
You want to say that, you have two tables at source side and want to store data to target table, later from target to flat file
or
You have two target table want to store data into flat file
Thanks
Phani -
Error when adding multiple source data stores in ODI Interface
I am trying to create an ODI Interface with couple of source tables and one target table. Say for example I am using the following data structure in my target table.
Order (Target Table)
order id
product id
customer id
address id
warehouse id
shipment id
for the above target table i need to extract data from each of the following source tables.
orderitem
product
customer
address
warehouse
shipment
Total 6 source tables i need to join however and load data for target table.
When I drag source data stores in to ODI interface mapping tab It throws the following Null Pointer Error. Due to this error I am not able to map target table with all the source tables.
Please suggest me what could be the reason for the error.
Error:
java.lang.NullPointerException
at oracle.odi.interfaces.interactive.support.clauseimporters.ClauseImporterDefault.importClauses(ClauseImporterDefault.java:81)
at oracle.odi.interfaces.interactive.support.actions.InterfaceActionAddSourceDataStore.performAction(InterfaceActionAddSourceDataStore.java:124)
at oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions.performAction(InteractiveInterfaceHelperWithActions.java:845)
at oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions.performAction(InteractiveInterfaceHelperWithActions.java:821)
at oracle.odi.ui.OdiSdkEntityFactory.dropSourceDataStore(OdiSdkEntityFactory.java:523)
at oracle.odi.ui.etlmodeler.diag.dragdrop.DiagramNodeDropHandler.dropObjects(DiagramNodeDropHandler.java:150)
at oracle.diagram.framework.dragdrop.handler.DelegateChooserDropHandler.dropSelected(DelegateChooserDropHandler.java:386)
at oracle.modeler.dnd.ModelerTCDropHandler.access$001(ModelerTCDropHandler.java:69)
at oracle.modeler.dnd.ModelerTCDropHandler$3.run(ModelerTCDropHandler.java:288)
at oracle.modeler.dif.GraphicAdder.addImpl(GraphicAdder.java:387)
at oracle.modeler.dif.GraphicAdder.addAndLayoutImpl(GraphicAdder.java:372)
at oracle.modeler.dif.GraphicAdder.addSelectAndLayout(GraphicAdder.java:348)
at oracle.modeler.dnd.ModelerTCDropHandler.dropSelected(ModelerTCDropHandler.java:284)
at oracle.diagram.framework.dragdrop.handler.DelegateChooserDropHandler.drop(DelegateChooserDropHandler.java:150)
at oracle.diagram.framework.dragdrop.DefaultDropPlugin.drop(DefaultDropPlugin.java:115)
at oracle.modeler.dnd.ModelerDropPlugin.drop(ModelerDropPlugin.java:100)
at oracle.diagram.framework.dragdrop.DropTargetHelper.drop(DropTargetHelper.java:188)
at oracle.diagram.framework.dragdrop.ManagerViewDragAndDropController$MyDropTargetListener.drop(ManagerViewDragAndDropController.java:802)
at java.awt.dnd.DropTarget.drop(DropTarget.java:434)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:519)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:832)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:756)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30)
at java.awt.Component.dispatchEventImpl(Component.java:4487)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4312)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4163)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Hello,
does somebody have a solution for this issue?
I am new to ODI and have the same problem. I am using ODI Designer Standalone Edition Version 11.1.1.
Maybe there is something wrong with my configuration, maybe I am doing something wrong while creating the mapping graphically. It does not help to save and re-open the mapping. Also it does not help to re-reverse engineer the objects. Also it does not seem to have something to do with the number of objects joined (some objects seem to always cause this error, with some the error starts when there are 10 or more objects on the map before they are added).
One possible workaround i have found is to do it all on the quick-edit tab by one by one creating the joins and mappings (+source or lookup joins and filter mapping). It seems to work with my configuration, but drag&drop functionality on the mapping tab would sometimes be faster, more convenient and just more human like.
Br,
Jaanus -
Synchronize RDBMS source view with ODI Interface
Hello ODI expert(s),
I'm new to ODI & hence experimenting.
I'm trying to load metadata from a SQL Server view to Oracle's Hyperion Planning.
My question is w.r.t source.
I've 6 columns in my source view. All 6 were mapped to the appropriate target fields. Suppose a column is removed from Source view. Is there any option in ODI to synchronize i.e. exclude the (now)unwanted column(& hence mapping) from the ODI Interface, I initially created?
Awaiting one of your responses.
- NateshI can relate to your issue.
ODI does this to me all the time.
The Operator logs show all greens and show no error, but no data makes its way to the Target.
I usually remove one mapping at a time and re-run the Interface. That helps me pin-point what might be the issue. Very frustrating. -
Connecting ERPi with ODI Interface
Hi Gurus,
Till now I was able to connect to Oracle EBS but, now my query is whether I can connect to ODI Interface through ERPi instead of connecting directly to EBS.
If its possible how can I achieve this please let me know I am eager to learn this.
ThanksIf you are just wanting FDM to pull the source data from a table in a SQL Server database, you would need to write a SQL integration Script in FDM To pull data from the database table. The FDM Administrator Guide has a simple example of this.
-
Call ODI interface from Business Rule
Hi All,
Is there any way to call ODI interface from business rule?
I search the forum and found there is a way to call java code from business rule by CDF.
ODI provide a dos batch file to invoke the ODI interface. But, how can I call batch file from business rule.
I am using planning version 11.1.1Thanks.
I can call the JAVA from business rule after assign the security in udf.policy.
And, I am working on calling ODI scenario. However, I found connection refuse as follows.
ava.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.<init>(Socket.java:367)
at java.net.Socket.<init>(Socket.java:180)
at oracle.odi.sdk.invocation.internal.AgentNetworkCmd.<init>(AgentNetworkCmd.java:38)
at oracle.odi.sdk.invocation.OdiInvocation.<init>(OdiInvocation.java:107)
at com.gammonconstruction.odi.ODICaller.main(ODICaller.java:
do I need to add scheduler agent for java request ?
and, how to add the agent if need? -
Options Complex Aggregate in ODI interface
I have one source and i need a one target aggregate table.
I have implemented the next sample query:
SELECT
ATRIBUTE1,
ATRIBUTE2,
ATRIBUTE3,
SUM(ATRIBUTE4),
SUM(ATRIBUTE5),
AVG(SUM(ATRIBUTE4+ATRIBUTE5)/ATRIBUTE6),
FROM TABLE_AGG
GROUP BY SUBSTR(ATRIBUTE1,0,6),ATRIBUTE2,ATRIBUTE3
¿Options to implement this query or similar please?
ThanksHave you looked at this thread?
how to use GROUP BY in ODI
Just add the SUM operator to the required target fields in your ODI interface and the GROUP BY clause will be added automatically by ODI. I note that you have a group by field that doesn't exist in your select list - was this deliberate? -
ODI Interface + Logical Schema
Hello Gurus, could someone please tell me how an ODI interface is linked to a logical schema. I understand before execution, you have to select the context, which is tied to a Physical Schema. But I need to execute an interface for a particular logical schema. Any help is highly appreciated.
Thanks, Naveen.Everything that you build in the designer (design time) is linked to a logical schema which references the logical model information of your datastores. Logical schemas are mapped to physical schemas based on a given context i.e. the ODI context you select at run time. Therefore at runtime based on the chosen conext the actual physical information i.e. file paths, database connection details etc are substituted for the logical references and generate the execution code.
Maybe you are looking for
-
SQLLOADER issues with Network Drive
Hi , I am running Oracle 10g in my PC ( Windows XP Professional ) in D Drive. I have created Oracle Directory and mapped to Network Drive Z: I have created external table successfully with this Directory. When i run select statement, i am getting the
-
After upgrading to Java 1.4.1_02, the compile would no longer work so I reinstalled Sun ONE Studio. Now I can compile, but the Form Editor tabs for Layouts, Swing, etc don't work. No response except a 2mm line moves around in the directly under the t
-
I had a Mad Dog CD/DVD burner sitting around, so I decided to throw it into the second bay. It worked at first, but it quickly stopped responding, and any program that tries to access the optical drives freezes up. Is the Mac Pro just not compatible
-
Folks, BP's created in CRM are not getting replicated to R/3. The BDoC has a successful status (Green) but when I open it, it has an error message "No batch input data for Screen SAPLV02Z 9500". Any ideas? Faz
-
Can the videos on this camera be imported into iphoto or imovie?