Exporting Data Of an RDBMS Table to another RDBMS Table using ODI Functions
Hi,
I'm facing a problem while Exporting Data Of an RDBMS Table to another RDBMS Table using ODI User Functions.
Name:- User_Func
Group:- Training
Syntax:- User_Func($(SrcField))
Implementation Syntax:-
(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH'
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'MEDIUM'
ELSE 'LOW'
Linked Technology:-Oracle
To map the GRADE column of my TARGET_EMPTABLE I write
User_Func(SRC_TABLENAME.SALARY)
using Expression Editor.
I got the following error
ODI-1227: Task ODI_FUNC_INTERFACE (Export) fails on the source ORACLE connection Source_DataServer.
Caused By: java.sql.SQLSyntaxErrorException: ORA-00905: missing keyword
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
and in code tab it is:-
select
SRC_FUNC_TABLE.E_NUMBER E_NUMBER,
SRC_FUNC_TABLE.E_NAME E_NAME,
SRC_FUNC_TABLE.E_LOC E_LOC,
(CASE
WHEN SRC_FUNC_TABLE.E_SAL > 40000 THEN 'HIGH'
WHEN SRC_FUNC_TABLE.E_SAL BETWEEN 30000 AND 40000 THEN 'MEDIUM'
ELSE 'LOW'
) E_GRADE
from SOURCE_SCHEMA.SRC_FUNC_TABLE SRC_FUNC_TABLE
where (1=1)
Please Help
Anindya Chatterjee wrote:
Hi,
I'm facing a problem while Exporting Data Of an RDBMS Table to another RDBMS Table using ODI User Functions.
Name:- User_Func
Group:- Training
Syntax:- User_Func($(SrcField))
Implementation Syntax:-
(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH'
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'MEDIUM'
ELSE 'LOW'
)Your CASE statement syntax is not correct
It is missing an END key word
It should be
(CASE
WHEN $(SrcField) > 40000 THEN 'HIGH'
WHEN $(SrcField) BETWEEN 30000 AND 40000 THEN 'MEDIUM'
ELSE 'LOW'
END )
Linked Technology:-Oracle
To map the GRADE column of my TARGET_EMPTABLE I write
User_Func(SRC_TABLENAME.SALARY)
using Expression Editor.
I got the following error
ODI-1227: Task ODI_FUNC_INTERFACE (Export) fails on the source ORACLE connection Source_DataServer.
Caused By: java.sql.SQLSyntaxErrorException: ORA-00905: missing keyword
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
and in code tab it is:-
select
SRC_FUNC_TABLE.E_NUMBER E_NUMBER,
SRC_FUNC_TABLE.E_NAME E_NAME,
SRC_FUNC_TABLE.E_LOC E_LOC,
(CASE
WHEN SRC_FUNC_TABLE.E_SAL > 40000 THEN 'HIGH'
WHEN SRC_FUNC_TABLE.E_SAL BETWEEN 30000 AND 40000 THEN 'MEDIUM'
ELSE 'LOW'
) E_GRADE
from SOURCE_SCHEMA.SRC_FUNC_TABLE SRC_FUNC_TABLE
where (1=1)
Please Help
Similar Messages
-
How to Copy complete structure of a table with data from one database table to another databse table
I need a sql query to copy structure of table with data from production table of ONLINEBTREKDB database to production table of Archive database.
I tried this query
select * into Archive.dbo.Production from ONLINEBTREKDB.dbo.Production p
but problem is I am able to copy the table schema and data but not able to copy constraints(PK)
Any Help?
seemaYou've multiple options
1. Use generate scripts wizard available in SQL management studio. This is particularly helpful when you want to script out lot of objects. You can also choose to script data as well inside this. This can be launched by right clicking the db, choosing tasks
-> generate scripts and then selecting required options inside the wizard
2. Use object explorer and right click and script out table. You can also use search functionality to find object you want inside object explorer
http://visakhm.blogspot.in/2013/02/object-filtering-using-ssms-object.html
3. Use query based on INFORMATION_SCHEMA views like TABLES,COLUMNS,CONSTRAINT_COLUMN_USAGE etc to generate the script
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Pooling data from an XML file to another XML file using File Adapter
Hi,
I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
Kindly suggest me some methods
Thanks in Advance.Ok here is a solution with external tables.
SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
2 /
Directory created.
SQL> DROP TABLE my_xml_et
2 /
Table dropped.
SQL> CREATE TABLE my_xml_et
2 ( EMPNO NUMBER,
3 EMPNAME VARCHAR2(10),
4 JOB VARCHAR2(10),
5 HIREDATE DATE,
6 SAL NUMBER
7 )
8 ORGANIZATION EXTERNAL
9 (
10 TYPE ORACLE_LOADER
11 DEFAULT DIRECTORY my_xml_dir
12 ACCESS PARAMETERS
13 (
14 records delimited by "</EMP>"
15 badfile my_xml_dir:'empxt%a_%p.bad'
16 logfile my_xml_dir:'empxt%a_%p.log'
17 FIELDS
18 (
19 filler char(2000) terminated by "<EMP>",
20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
25 )
26 )
27 LOCATION ('emp.xml')
28 )
29 PARALLEL
30 REJECT LIMIT UNLIMITED
31 /
Table created.
SQL> SELECT * FROM my_xml_et
2 /
EMPNO EMPNAME JOB HIREDATE SAL
7369 SMITH CLERK 17-DEC-80 800
7499 ALLEN SALESMAN 20-FEB-81 1600
This is the XML file i used emp.xml
<EMPLOYEES>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
</EMP>
</EMPLOYEES>
Use this external table to insert into your table.
Thanks,
Karthick. -
How to use one hash table inside another hash table
Hi everyone,
Any example of hash table inside another hash table.
Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
Thanks,
kanty.Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
Edited by: sabre150 on Jul 2, 2010 10:11 PM
Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain. -
Reference a Derived table in another Derived Table
Is it possible to reference a derived table from another derived table? I am using Business Object XI 3.0.
This is not possible as the Designer wants physical tables...
What you could do is create the second derived table as follows:
SELECT table1.col1,
table1.col2,
table2.col1,
table2.col2
FROM table1,
(SELECT col1,
col2
FROM atable) table2
Regards
Jacques -
How to append Header of an internal table to another internal table
Hello Experts,
Can we append the header of an internal table to another internal table? Do we have have to use work area for this?
Thanks.Wrong - it will append only the header. If you want to append the whole table, you would:
APPEND LINES OF itab1 TO itab2.
If you need more help, please press F1 on APPEND.
Rob
Edited by: Rob Burbank on Mar 3, 2008 4:06 PM -
Moving few contents of one internal table to another internal table
Hi
I want to move some contents of one internal table to another internal table, which records match our condition
(without loop)
Example:
1 aa
2 aa
3 aa
4 bb
5 cc
6 aa
7 cc
8 dd
now i want to move records which contain aa to one internal table without using loop.
is there any statemnt to achieve this
Reagrds
SrinivasuHi Srinivasu,
Just create an another internal table say itab2 having the same structure.
Then use the following code:
itab2[] = itab1[]
delete itab2 where field2 <> 'aa'.
Hope this will help.
Regards,
Nitin.
Edited by: Nitin Karamchandani on Nov 21, 2008 8:51 AM -
I have two server TestSource and TestDestination . In both the tables I have common table like below. I would like to copy the data from TestSource server src_Table to TestDestination server table dest_table
excluding the column timestamp. This process I would like to achieve dynamically. Since I have 50 tables where I need to copy from source server to destination server.
Rule : This needs to achieve using script task. Please help me to find the solution as it is very urgent requirement.
Above rule is because No option to choose export wizard dynamic query option for linked server.
--Source
Table
CREATE TABLE src_table
a int,
b int,
c timestamp
--Dest Table
CREATE TABLE dest_table
a int,
b int,
c timestamp
Thank you in advance.
HariI have two server TestSource and TestDestination . In both the tables I have common table like below. I would like to copy the data from TestSource server src_Table to TestDestination server table dest_table
excluding the column timestamp. This process I would like to achieve dynamically. Since I have 50 tables where I need to copy from source server to destination server.
Rule : This needs to achieve using script task. Please help me to find the solution as it is very urgent requirement.
Above rule is because No option to choose export wizard dynamic query option for linked server.
--Source
Table
CREATE TABLE src_table
a int,
b int,
c timestamp
--Dest Table
CREATE TABLE dest_table
a int,
b int,
c timestamp
Thank you in advance.
Hari -
Hi, I'm trying to export data to a spreadsheet from an Agilent 8510c to a laptop(Win XP) using a PCMCIA-GPIB card, Labview 6 and the VI from the NI site. How do I do this? Ideally I'd like the Magnitude and Phase Data, as pairs for each frequency point, but the Real and Imaginary pairs can work just as well. Any help would be greatly appreciated.
When you say the "VI from the NI site", I'm going to assume that you mean the HP8510C driver. If that's the case, then VI called HP8510C Application Example should be your starting point. It returns two 1D arrays - real raw data and imaginary raw data. These can be combined with a Build Array function and the resulting 2D array can be wired to the Write to Spreadsheet File function. This will create a tab or comma separated file that Excel or any other spreadsheet program can import. The very simplest program would look something like the attached picture. You may need to modify the instrument program to suit your requirements but this should get you started.
Attachments:
HP8510C_and_Spreadsheet_Write.jpg 5 KB -
Moving internal table to another internal table using ASSIGN statement.
Hi,
We have a requirement to move an internal table form one program(SAPMV60A) to the internal table of the include(RV61B9xx) using the following statement.
[ xvbrp is a internal table in SAPMV60A. ]
ASSIGN ('(SAPMV60A)xvbrp') TO <ls_xvbrp>.
We tried all the combinations for declaring <ls_xvbrp> as table.
It is going to dump in our system,
" Type conflict with ASSIGN in program "SAPLV61B ".".
Your efforts will be rewarded with points.
Thanks in Advance,
Warm Regards,
BaburajHi
If you declare your field-symbols as table you should use []
FIELD-SYMBOLS: <ls_xvbrp> TYPE TABLE.
ASSIGN ('(SAPMV60A)xvbrp[]') TO <ls_xvbrp>.
else
FIELD-SYMBOLS: <ls_xvbrp> TYPE ANY.
ASSIGN ('(SAPMV60A)xvbrp') TO <ls_xvbrp>.
But I believe in this case you'll assign the header line of xvbrp.
Max -
Problem passing a table parameter in rfc call using the function control
I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
The SAP RFC Control is created with
Set sapFunctions=CreateObject("SAP.Functions")
Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
<i>'set exports</i>
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
<i>'append table row</i>
.Tables("IT_SALES_DATA_UPD").AppendRow
.Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
.Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
.Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
.Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
.Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
.Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i>'do something with the return tables here...</i>Else
Debug.Print sapMaterialUpd.Exception
End If
The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
The local logfile that the control generates shows that an exception occurs at the point of the call:
<i>10.02.2005 17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
Packing Parameter PA_GLPUPDLEVEL.
Packing Parameter PA_VKORG.
Packing Table 0.
Packing Table 1.
10.02.2005 17:54:20.766 *** Calling RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
10.02.2005 17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
10.02.2005 17:54:20.986 RFC Error: RFC_IO27
-Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
-Message:connection closed
-Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
10.02.2005 17:54:20.986 Function call finished.</i>
Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
'set exports
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
'do <b>not</b> append a table row, for testing only ;-)</b>
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i> 'do something with the return tables here...</i>
Else
Debug.Print sapMaterialUpd.Exception
End If
This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
Any hints are welcome!hi All partner,
who solved this problem , I meet it too and
can't clear it.
SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');
SAPitab := sapfunc.tables.item ('I_DNMO');
SAPitab.appendrow; SAPitab.value(1,'MANDT') := '220';
SAPitab.Value(1,'VBELN') := '2150000001';
SAPitab.Value(1,'POSNR') := '50';
SAPitab.value(1,'MATNR') := '19-99999-00';
SAPitab.value(1,'AUFNR') := '921241512001';
SAPitab.value(1,'DEDAT') := '2005/09/09';
SAPitab.value(1,'LFIMG') := '100';
IF SAPfunc.call = true then
begin
end
else
begin
showmessage('call fail!!') ;
end;
end;
RFC source code as below
FUNCTION z_get_sfcs_dn_mo.
""Local interface:
*" TABLES
*" I_DNMO STRUCTURE ZDN_MO
data: wa type zdn_mo.
LOOP AT i_dnmo.
wa-mandt = i_dnmo-mandt.
wa-vbeln = i_dnmo-vbeln.
wa-posnr = i_dnmo-posnr.
wa-matnr = i_dnmo-matnr.
wa-aufnr = i_dnmo-aufnr.
wa-dedat = i_dnmo-dedat.
wa-lfimg = i_dnmo-lfimg.
modify zdn_mo from wa.
insert into zdn_mo values wa. --dump at here
commit work.
ENDLOOP.
T/C: ST22 error message say at
insert into zdn_mo values wa. ---dump at here
the sapfunc.call returns fail.
Message was edited by: jorry wang -
Error while export data from a xml file to an relational table
Hi,
I am Creating an ODI Project: Developing an ODI XML to Database Transformation Using Interface with ODI Constraint following this link
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/odi_project_xml-to-table/odi_project_xml-to-table.htm
This project executed successfully with some warning.*Target Table is automatically created in database and also populated with data*.But when I right-click Target Datastore(in Mapping Tab of the Interface), and then select Data to View Data that needs to be inserted in the target table. I get some error like this:-
Execution of Query Failed.
Details:-
See com.borland.dx.dataset.DataSetException error code: BASE+62
com.borland.dx.dataset.DataSetException: Execution of query failed.
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.queryFailed(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.a(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
at com.sunopsis.graphical.frame.DwgDataFrame.initialize(DwgDataFrame.java:368)
at com.sunopsis.graphical.frame.DwgDataFrame.<init>(DwgDataFrame.java:77)
at oracle.odi.ui.etlmodeler.diag.inspector.pane.popup.DiagramActionDispayDataTarget.actionPerformed(DiagramActionDispayDataTarget.java:91)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
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)
Chained exception:
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
at com.borland.dx.sql.dataset.o.f(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
at com.sunopsis.graphical.frame.DwgDataFrame.initialize(DwgDataFrame.java:368)
at com.sunopsis.graphical.frame.DwgDataFrame.<init>(DwgDataFrame.java:77)
at oracle.odi.ui.etlmodeler.diag.inspector.pane.popup.DiagramActionDispayDataTarget.actionPerformed(DiagramActionDispayDataTarget.java:91)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
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)
Please HelpMichael R wrote:
The target table will be created when you execute the interface, if you set the option on the flow tab as instructed in step #6 of the "Setting up ODI Constraint on CLIENT Datastore" Section.
Option Value
CREATE_TARG_TABLE trueHi Michel,
This was not my required answer.I am sorry that I was unable to clarify my question.Actually
+This project executed successfully with some warning.Target Table is automatically created in database and also populated with data.But when I right-click Target Datastore(in >Mapping Tab of the Interface), and then select Data to View Data that needs to be inserted in the target table.I get some error like this:-...+This above line is the result of my project my problem is
when I right-click Target Datastore(in Mapping Tab of the Interface), and then select Data to View Data that already inserted in the target table.Is not shown by the view data operation.
I meant to say I am facing this error
At the10(1010 written) step of
Creating a New ODI Interface to Perform XML File to RDBMS Table Transformation
wehre it says
Open the Interface tab. Select Mapping tab, right-click Target Datastore - CLIENT, and then select Data. View Data inserted in the target table. Close Data Editor. Close the tabs...
In my case when I use my sqldeveloper I can see data successfully inserted in my target table and also in error table (data that can't satisfy the constraint) .But I was unable to check this by following the above mentioned 10 th step and got this error.
Thanks -
How to read from a WD table to another WD table?
Hi
I need to read a WD table of multiple values and transfer in to different WD Table.
I tried to get size of first table and could not move forward programmatically? Please help with some sample code.
Thanks
Praveenhi ,
Just one clarification , Are both tables of same structure (as in fields) ??
If yes , then you can read the context node bound to the source table using get_static_attributes_table() method
and then bind this data(internal table) to the context of destination table.
Thnks,
aditya. -
How to export data to .csv and send that file to folder using sql commands?
Really hoping someone can provide some code sample or point me in the right direction (with examples using sql).
I am using oracle 11g with plsql developer. My requirement is that the data retrieval should be automatic. That means when query a data in oracle table , the data should be convert into .csv file and then it should send that to some specific folder.
Example: Assume that student_sub1 table have all students subject1 data.when i write a query like select * from student_sub1 where student=1, the student1 data should convert into .csv file and then the .csv file should go to student1 folder.
Hence I am requesting you to suggest me how write a sql code to convert the data into .csv file and to create a folder to send that file using oracle.
Your inputs helps me alot.
Thanks in advance!!!!
Waiting for your replies.... Cheers981145 wrote:
Really hoping someone can provide some code sample or point me in the right direction (with examples using sql).
I am using oracle 11g with plsql developer. My requirement is that the data retrieval should be automatic. That means when query a data in oracle table , the data should be convert into .csv file and then it should send that to some specific folder.
Example: Assume that student_sub1 table have all students subject1 data.when i write a query like select * from student_sub1 where student=1, the student1 data should convert into .csv file and then the .csv file should go to student1 folder.
Hence I am requesting you to suggest me how write a sql code to convert the data into .csv file and to create a folder to send that file using oracle.
Your inputs helps me alot.
Thanks in advance!!!!
Waiting for your replies.... CheersSET COLSEP ,
spool student1.csv
select * from student_sub1 where student=1;
spool off
How do I ask a question on the forums?
SQL and PL/SQL FAQ
Handle: 981145
Status Level: Newbie
Registered: Jan 10, 2013
Total Posts: 25
Total Questions: 10 (8 unresolved)
I extend my condolences to you since you rarely get answers to your questions here. -
How to copy data from one table to another (in other database)
Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
ResultSet rset = stmt.executeQuery("select ...");
But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.
Maybe you are looking for
-
Problems with report builder 3.0 in SCCM 2012 R2 CU2
Hi All I have problems with editing (Using Report builder) existing reports or creating new ones in SCCM 2012 R2 CU2 We version of SQL we use is SQL 2008 R2 SP2 I already asked this question in the SCCM 2012 forum but the problem is not related to
-
Assign to a globa variable value from html variable.
I need to assign to a global varaible say pkg1.var1 a value from the form.varaible.value how can it be done. The code looks like htp.p('<form name="f_a" method="get" >'); htp.p( 'Your ref. nr.: '); htp.p('<input type="text" name="f_var1" maxlength="2
-
Sync of address book/contacts not "taking"
I watched the tutorial on how to sync my address book on my laptop with the iMac contacts. Then I followed the instructions today (8/12/07), and I seemed to have synced successfully. However, when I login to iMac and open the address book, I still ge
-
Same logical system name for two productive systems - BW, PI issues
Dear all, we have a productive system which serves two companies (different company codes). This system is connected both to BW and PI for both companies. There is a requirement that these two companies must use their own system, so the whole landsca
-
A fix that works for your battery drain with iOS 8.2
After I updated my iPhone 4s to the new iOS 8.2 I found my battery life had become terrible. I could barely make it through an 8 hour day at work before my phone would die. It was so bad that I had to get myself a second charger to plug it in durin