Create target table using ODI model
Hi all,
I am new to ODI. I am trying export RDBMS table to RDBMS table from source to target.
whether we need to create target table structure in trg schema or we can create using obi trg model by selecting new datastore.
In owb while loading target tables are created and data will be loaded.
Pls help me regarding this.
thanks in advance.
Hi
You can create it in both ways.if you create datastore by using ODI you must select create target table option in flow while loading to target.
Similar Messages
-
Create Target Table Automatically with ODI
Hi,
We can reverse engineer the source table Schema from the source Database, does ODI support creating the target schema based on the source schema on the Target Database automatically? is there any better way rather than creating manually on the target DB? Thanks in advance!If you are setting the staging area different from target then at IKM level choose CREATE TARGET TABLE to YES.
ODI will create the target table for you. In ODI we call this type of interface as Yellow Interface. -
How to load data dynamically into target tables using files as a source
Hi ,
My scenario needs a single interface to load the data of 5 different files into five target tables using a single interface. All target tables have the same structure. It is possible to point to variable source files using ODI. But the same approach is not working with Database tables. I am getting errors while trying to make my target /source table as a dynamic one.
Can anybody suggest anything. The last option would be writing a dynamic PL/SQL block in the KM. Any other suggestions friends ?
Regards,
AtishAfter creating a pair of identical source and target tables, I have carried out the following steps:
I am trying just keeping the target as variable
a)created a one to one interface,
b)tested that it is running.
c)created a variable(type =text),
d)used the variable as #v_name in the resource of the target table datastore.
e)in a package used the variable in a set variable step (first step).
f) used the interface as the second step.
g)executed the same in my context.
the <project_code>.variable_name is not getting substituted in the sql_code that is generated by the KM. My KM is SQL Control Append and following is the code that it generates in the Insert into I$ step:
/* DETECTION_STRATEGY = NOT_EXISTS */
insert /*+ APPEND */ into HR.I$_JOBS_COPY1
JOB_ID,
JOB_TITLE,
MIN_SALARY,
MAX_SALARY,
IND_UPDATE
select
JOBS.JOB_ID JOB_ID,
JOBS.JOB_TITLE JOB_TITLE,
JOBS.MIN_SALARY MIN_SALARY,
JOBS.MAX_SALARY MAX_SALARY,
'I' IND_UPDATE
from HR.JOBS JOBS
where (1=1)
and not exists (
select 'X'
from HR.#PLAYGROUND."v_tab_name" T
where T.JOB_ID = JOBS.JOB_ID
and ((JOBS.JOB_TITLE = T.JOB_TITLE) or (JOBS.JOB_TITLE IS NULL and T.JOB_TITLE IS NULL))
and ((JOBS.MIN_SALARY = T.MIN_SALARY) or (JOBS.MIN_SALARY IS NULL and T.MIN_SALARY IS NULL))
and ((JOBS.MAX_SALARY = T.MAX_SALARY) or (JOBS.MAX_SALARY IS NULL and T.MAX_SALARY IS NULL))
) -
How to read I$ table using ODI procedure
Hi
Can any one help me how to drop a I$ table from out sie of interface.
I have tried below approches but no luck
I have created ODI procedure with technology oracle and target logical schema (I$ tables are creating on target DB) with and with out begin and end;
Approch 1:
Given below code in ODi procedure
drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> <% if (new Integer(odiRef.getOption( "COMPATIBLE" )).intValue() >= 10 ) { out.print( "purge" ); }; %>
Approch 2:
drop table I$_<%=odiRef.getTable("L", "TARG_NAME", "A") %>;
Approch 3:
drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> (but it is fetching target dtabase schema anme not I$ table)
Please help me any other alternative way to drop a I$ table, more over this code should be unique for all interface
Regards,
PhanikanthThanks bhabani,
Actaul my requirement is some time my scenario is stoping due some issue at Merge Rows Step (I am using IKM Oracle Incremental Update(Merge) KM) when the next iteration starts it is thwoing and error at create flow table I$ step and error is table name is already exists, so i am doing is if the interface went failed I am storing those information in one table using ODI procedure (INF--ko-->ODI procedure) in same ODI procedure I want to call a I$ table to drop.
Can you please provide the steps so it will very useful for me using Java variable.
I have gievn a step as below on create I$ table step (after create I$ statement)
<@ java.lang.String Idollertable = <%=odiRef.getTable("L", "INT_NAME", "W")%> ; @>
I am calling Idollertable variable in ODI procedure which is ko>* of INF as <@=Idollertable@>
Note: I have followed below approch
ODI Procedure Code:
drop table <@=Idollertable@>; --> *2nd approch*
begin
insert into ODI_EXECUTION_ERROR_DETAILS
(SESSION_NO,
SCENARIO_NAME,
CONTEXT_NAME,
ERR_MESSAGE,
INSERT_COUNT,
ERROR_COUNT)
values
<%=snpRef.getSession("SESS_NO")%>,
'<%=odiRef.getPrevStepLog("STEP_NAME")%>',
'<%=odiRef.getContext( "CTX_NAME" )%>',
'<%=odiRef.getPrevStepLog("MESSAGE")%>',
'<%=odiRef.getPrevStepLog("INSERT_COUNT")%>',
'<%=odiRef.getPrevStepLog("ERROR_COUNT")%>'
commit;
drop table <@=Idollertable@>; --> * first approch *
end;
Please help me
Regards,
Phanikanth
Edited by: Phanikanth on Mar 3, 2013 9:52 PM
Edited by: Phanikanth on Mar 3, 2013 9:52 PM -
Hi All,
Can we create a target table in ODI as like we create target definition in Informatica. If yes, please let me know as i'm new to ODI.
Also can you please give me a simple example on how variable works.
Thanks,
VBVHi VBV,
How are you?
Yes, its possible to create target table thro interface at run time.
In all IKM (at Flow tab) you can find CREATE_TARG_TABLE, if you opt that to YES it will create the table in the back end.
For variables, please refer Note:471564.1 in metalink.
Thanks,
G -
How to delete the data loaded into MySQL target table using Scripts
Hi Experts
I created a Job with a validation transformation. If the Validation was failed the data passed the validation will be loaded into Pass table and the data failed will be loaded into failed table.
My requirement was if the data was loaded into Failed database table then i have to delete the data loaded into the Passed table using Script.
But in the script i have written the code as
sql('database','delete from <tablename>');
but as it is an SQL Query execution it is rising exception for the query.
How can i delete the data loaded into MySQL Target table using scripts.
Please guide me for this error
Thanks in Advance
PrasannaKumarHi Dirk Venken
I got the Solution, the mistake i did was the query is not correct regarding MySQL.
sql('MySQL', 'truncate world.customer_salesfact_details')
error query
sql('MySQL', 'delete table world.customer_salesfact_details')
Thanks for your concern
PrasannaKumar -
How to create a table using subform if lifecycle designer 7.1 not availabl
hi,
plis tell me how to create a table because i am using adobe lifecycle 6.1 and in the library
there is no object for table..
also tell me that if i have adobe lifecycle designer then which is better option and why?
use table from library directly or create a table using subform...Hi Sweta,
Create the interface attributes of type string and xtring type.
Create node in the context of type graphics. bind the interface fields to the graphic node context element properties -
Graphic content, field of xzstring type and mimetype to be string/any char data type of suitable length.
In layout drag and drop the image field and bind it to the graphic element.
In yoour report programme-
do the code as berlow to pass the graphic data -
<i>CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = '<mime type graphic name>'
p_id = 'BMAP'
p_btype = 'BCOL' "BMON if monochrome
RECEIVING
p_bmp = w_binary
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.</i>
in the call <form function module>
pass the inerface values for
xstring (graphic field) to be w_binary (import parameter of the previous method)
and mime type to be 'image/bmp'.
This would work.
Hope fully you may be able to see a tutorial on this soon ;).
- anto. -
How to create a table using Text Layout Framework?
How to create a table using Text Layout Framework? I meen real tables - like in HTML.
Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
Regards
Raf -
How to create a table using polish
I am able to show all the database records in table form but i want to edit a particular cell of the table, how to do that. thanks in advance.
Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
Regards
Raf -
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 HelpAnindya 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 -
I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?
It sounds like what you are trying to do is edit the choices in a likert field to something other than the default radio button. This is not something that you can do in Formscentral at this time.
Andrew -
Export the data with Alias from the alternative table using ODI
Hi!
How to export the data from Essbase with Alias from the alternative table using ODI?
Thanks.Are you on 10.1.3.6.x? Then: http://john-goodwin.blogspot.com/2008/09/odi-series-part-2-agent.html
Are you on 11g? Then: http://john-goodwin.blogspot.com/2010/12/managing-odi-11g-standalone-agents.html
I will say with only a mild amount of shame and a large amount of gratitude that I installed both releases' agents through John's blog posts.
Regards,
Cameron Lackpour
Edited by: CL on Jun 4, 2012 5:48 PM
Whoops, had the same link in there twice. -
Create temporary Tables using SQL
Hello,
I'm wondering if SAP allows the creation of new Tables without SDK objects,
I want to create temporary tables using SQL scripts an compile them when an specific addon is connected and erase them when the addon disconnects,
Do you think this is allowed?.
thanks,
GabrielaYou could always have a second DB to create your temp tables in. This is the way I've done this, as well as created my own views and stored procedures in it. No updating of the primary table necessary. The way I named things was:
Company_DB - Company Database
Company_DB-Extern - My own stuff
Then, in sap, you can just do [Company_DB-Extern]..Object to call it, or you do the same from withing your project. -
How do I get the rowcount of target table using Sunopsis API in ODI 10g ?
Hi guys,
Actually I want to send an alert mail once interface is run from a package. I have included OdiSendMail alert which sends a mail once interface is run.
Could anyone please tell how to get the no of rows inserted in the target table from Sunopsis API.
I tried using <%=odiRef.getNbRows( )%> but this did not work for me. Since I'm a beginner, could you please help me out
This is my ODI send mail format
" Data population has been completed successfully at <%=odiRef.getSysDate( )%>
Total rows in target table are: <-- need some API code --> ''
Regards,
Clinton
Edited by: LawrenceClinton on Feb 25, 2013 8:53 PMHi
Create project variable with below details
Variable_name: Total_Row_Count
Variable Type: Refresh Variable
Definition Tab:
Datatype: Numeric
Action: Not Persistent
Refreshing Tab:
Schema: provide your Work Repository Schema and be
SELECT log.nb_row
FROM snp_step_log log, snp_scen_step step
WHERE log.nno = step.nno
AND step.scen_no =( SELECT scen_no FROM snp_scen_step WHERE step_name='<%=odiRef.getPrevStepLog( "STEP_NAME" )%>' )
AND log.sess_no = '<%=odiRef.getSession( "SESS_NO" )%>'low code
AND step.step_name = '<%=odiRef.getPrevStepLog( "STEP_NAME" )%>'
Note: Add this variable after interface step in your package (after the interface any where you can place), you can add this variable before ODISendEmailNotification Step in your package
Call this varciable *#Total_Row_Count* in ODISendEmail Notification
eg:
Data has been populated successfully at <%=odiRef.getSysDate( )%>
Total no of rows populated are : *#Total_Row_Count*
It will work
Regards,
Phanikanth
Edited by: Phanikanth on Feb 28, 2013 1:13 AM
Edited by: Phanikanth on Feb 28, 2013 1:14 AM -
How to purge tables using odi ???
hi,
I want to purge the Data in target table.my Data Policy is to only retain the only 90 days. I have to keep only 90 days data. How can i do this in ODI. I have only one DATE column.
Thanks,
Regards,
AMSIIIf your existing date field can be used to identify the records to be purged, then you could simply create a procedure in ODI along the lines of
delete from <%=odiRef.getSchemaName( )%>.*your_table* where your_date_field < (sysdate - 90)
This is the simplest way, but be wary of your indexes on the table that they don't get too fragmented. You could also investigate using a daily partition startegy on the table which would enable you to drop partitions older than 90 days which would be much faster.
Maybe you are looking for
-
Mirroring with vga adaptor?
is it possible to mirror ipad 2 using a vga adaptor and a projector?
-
Worse DVD quality in LCD TV than CRT
Hi, I played the same Dvd, that I made with compressor and DVDSP, on a Lcd Tv and on a CRT Tv, in the latter it works fine, in the first one the images look worse with many artifacts and a bit blurry especially when the camera is zooming or panning.
-
Receipt of online payments/donations
organizations such as paypal work with html code to set up the link to accepting donations etc to a web site. Since iweb doesn't operate that way does anyone know how to set up a link to accept monies securely. thanks
-
Maximum number of PXE servers for WDS/MDT
We have an imaging environment based on Windows Server 2012 R2 using WDS with MDT. For optimal speeds, each imaging station has a server dedicated to it, with its own Multicast address space. Due to the success and speed accomplished with 10 stations
-
Viewing 16:9 video on a 16:9 monitor
I am currently editing video that was shot in true 16:9 ratio. I also have a external widescreen monitor as my preview. On the external monitor it is compressed to a 4:3 ratio. I changed the aspect ratio view on the television but that doesn't do not