CREATE TARGET TABLE
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,
VBV
Hi 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
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. -
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. -
ODI - Create a Target Table Definition from a source View defination
Hi ,
I have source as Oracle View with bunch of fields and want to create target table in MSSQL server by using oracle view. can you please guide me that how i can build with help of ODI.
Thanks in advance.
Regards,
Bhavik
Edited by: user629194 on Nov 6, 2009 10:46 AMHi,
Use a small trick...
Duplicate the Oracle view (right-click on it), edit and change from view to table.
Drag and drop the duplicate into the MS SQL Server model
In the interface, change the "Create target Option" to yes at IKM Options...
That is all!
Works?
Cezar Santos
[www.odiexperts.com] -
Hi All
I am using ODI 10.1.13
I have declred teh Target datastore
and mapped the target datastore with source in teh interface
But when ODI is creating teh target database all the columns are created with accepting NULL Properties.
where as i hv declared some as null and some with notnull.
when i checked in IKM Oracle Incrimental KM(MERGE)-> create target table step
the coding is
create table <%=odiRef.getTable("L", "TARG_NAME", "A")%>
<%=odiRef.getTargetColList("", "[COL_NAME]\t[DEST_CRE_DT] NULL", ",\n\t", "")%>
due to which the target table is created with all field havine NULL properties.
But i want the columns should hv the properties declared in the datastore.Eg. some columns with NULL and some columns with NOT NULL properties.
Please help..
GourisankarIn the IKM Merge , change the null to + odiRef.getInfo("DEST_DDL_NULL") so finally something like this <%=odiRef.getTargetColList("", "[COL_NAME]\t[DEST_CRE_DT] " + odiRef.getInfo("DEST_DDL_NULL"), ",\n\t", "")%> For bulk insert try SQL Control Append
-
Create target File is possible?
Hi,
I just need to know whether we can create a Target file in the interface? Let me explain my steps which i am doing.
1. I created a interface which holds MSSQL Server table let say employee table in source and its been mapped with a simple file technology in the target let say employee.txt.
All my question is when i ran the interface is it possible for moving all the records from employee table to employee file in the target and create the employee file automatically.
Note: its same like in IKM there is an option called Create Target Table.
Please let me know if its possible or not. If yes what i have to do for that?
Thanks,
GuruHI...
If you use the IKM Sql to File it should create the file...
Isn't that working? -
Modified "Create error table" from CKM SQL problem
Hi guys!
I have a strange problem while creating error table by the CKM. I've changed in the interface from flow control to static control and now the command to create error table looks like:
create table STG_TMP.E$_I_D_ASSORTMENT_S
ERR_TYPE VARCHAR2(1 CHAR) NULL,
ERR_MESS VARCHAR2(250 CHAR) NULL,
CHECK_DATE DATE NULL,
ORIGIN VARCHAR2(100 CHAR) NULL,
CONS_NAME VARCHAR2(35 CHAR) NULL,
CONS_TYPE VARCHAR2(2 CHAR) NULL
the create error table(it should create table with all the columns varchar2 and handle the situation when column is number(0,0) => varchar2(255)) step from CKM is:
<%=snpRef.getColList("<?\t", "int vL[POS]=[LONGC]+[SCALE]; if(\u0022[DEST_DT]\u0022.equals(\u0022DATE\u0022)) {vL[POS]=20;}; if(\u0022[DEST_DT]\u0022.equals(\u0022NUMBER\u0022) && vL[POS]==0) {vL[POS]=255;};", "\n \t", "\n?>", "INS")%>
create table <%=snpRef.getTable("L","ERR_NAME", "W")%>
ERR_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "1", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
ERR_MESS <%=snpRef.getDataType("DEST_VARCHAR", "250", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CHECK_DATE <%=snpRef.getDataType("DEST_DATE", "", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
<%=snpRef.getColList("", "[COL_NAME]\t varchar2 (<?=vL[POS]?>) " + snpRef.getInfo("DEST_DDL_NULL"), ",\n\t", "", "INS")%>,
ORIGIN <%=snpRef.getDataType("DEST_VARCHAR", "100", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CONS_NAME <%=snpRef.getDataType("DEST_VARCHAR", "35", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CONS_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "2", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>
Do you know whats the problem??
Thanks in advance :)
With regards,
PsmakRWhat version of ODI are you using ?
Are you still using Sunopsis ?
Try using ODI 10.1.3.5
Also, follow the solution in post
Issue with Create Target Table in CKM Oracle -
How do I create a target table with the same PK as the source table?
I am trying to create a target table in a mapping that will end up with the same primary key as the source table.
It is a simple map that simply uses a subset of the columns of the source table in the target table. I was wanting to create and bind a new table by dragging the columns I want from the source to the initially blank target table operator, change the column names and create a primary key to match the source table.
I can't seem to be able to create a constraint on the table in the mapping. I can create the constraint after the table is created and boound to the database object but the PK doesn't carry back into the mapping.
I need it in the mapping so I can use the UPDATE/INSERT operation and use the 'All Constraints' implementation. The mapping won't let me validate the object without the PK on it in the map.
Believe it or not folks, I am getting better at this.
Thanks very much for the guidance.
GaryHi Gary
You are close, you are really close... :-))
You need to do exactly as you propose plus one extra step. Build the map as you describe, binding the new table to the target. Then you edit the table definition to add the primary key and any other constraints you need. After this is the step that you are missing.
You need to do the following:
1. Go back and re-edit the map
2. Right click on the table
3. From the pop up menu, select Reconcile Inbound
4. Set any operators that you need for the UPDATE/INSERT
5. Save the map
6. Commit your changes
The first three steps above make the map read in the indexes and constraints that you set on the table. Finally, you need to deploy the table and then deploy the map.
Hope this helps
Regards
Michael -
Don't have primary Key in Target table getting errror while creating index
Hi All,
I don't have primary key column in target table, while exicuting mapping I got a error while creating INDEX.
Could you please help how to slove thisHi,
That is a process definition issue.
If you don't have a PK then:
1) or you don't execute updates
2)or you have an alternate Key to update it.
Case 1) just change the KM to IKM Control Append
Case 2) at interface, go to each column what is Alternate Key and check it as key (click at column and check the box Key at bottom of propriety window).
Does it work to you? -
Can someone pls Help me: How to create a Fake target table(Dummy) in DAC
Hi There,
Can someone pls Help me in creating a Fake target table(Dummy) in DAC?
Thanks,
RaghuRaghu
You need to create a task so that you can hook sources and targets together.
First, Design --> Tables tab --> New --> Below 'Edit' -->Table Type (Source) for your source tables.
Design --> Tables tab --> New --> Below 'Edit' -->Check warehouse and Table Type (Fact or Fact Temporary) for your target tables.
Points if helpful
Kris -
Create a Master-Detail Records in target table
hi,
I have a source in a table that contains the infos of customers and for each customer record, we have three fields representing the customer ID
(Identity card, SIN, passport ID) and I want to create 3 record in the target table for each customer, each record contains information for each ID
How can we do with OWB?
thanks.hello
i belive you need to use pivot operator
check out this blog
https://blogs.oracle.com/warehousebuilder/entry/pivoting_data_in_owb
rgds -
ODI-1228: Task PRD-create-populate-table (Procedure) fails on the target
I get this error when trying to run PRD-create-populate-table from Oracle by example ODI
ODI-1228: Task PRD-create-populate-table (Procedure) fails on the target ORACLE connection ODI_DATA_SERVER.
Caused By: java.sql.SQLSyntaxErrorException: ORA-02264: name already used by an existing constraint
ODI-1228: Task PRD-create-populate-table (Procedure) fails on the target ORACLE connection ODI_DATA_SERVER.
Caused By: java.sql.SQLSyntaxErrorException: ORA-02264: name already used by an existing constraint
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3467)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)the specified constraints name is still used. Please check if you are having the order correctly ie drop table , create and insert and check if the table is dropped , if still the constraints is there then drop it from database
-
Can not Load CLOB data 32k to target table
SQL> DESC testmon1 ;
Name Null? Type
FILENAME VARCHAR2(200)
SCANSTARTTIME VARCHAR2(50)
SCANENDTIME VARCHAR2(50)
JOBID VARCHAR2(50)
SCANNAME VARCHAR2(200)
SCANTYPE VARCHAR2(200)
FAULTLINEID VARCHAR2(50)
RISK VARCHAR2(5)
VULNNAME VARCHAR2(2000)
CVE VARCHAR2(200)
DESCRIPTION CLOB
OBSERVATION CLOB
RECOMMENDATION CLOB
SQL> DESC test_target;
Name Null? Type
LOCALID NOT NULL NUMBER
DESCRIPTION NOT NULL CLOB
SCANTYPE NOT NULL VARCHAR2(12)
RISK NOT NULL VARCHAR2(6)
TIMESTAMP NOT NULL DATE
VULNERABILITY_NAME NOT NULL VARCHAR2(2000)
CVE_ID VARCHAR2(200)
BUGTRAQ_ID VARCHAR2(200)
ORIGINAL VARCHAR2(50)
RECOMMEND CLOB
VERSION VARCHAR2(15)
FAMILY VARCHAR2(15)
XREF VARCHAR2(15)
create or replace PROCEDURE proc1 AS
CURSOR C1 IS
SELECT FAULTLINEID,VULNNAME,scanstarttime, risk,
dbms_lob.substr(DESCRIPTION,dbms_lob.getlength(DESCRIPTION),1) "DESCR",dbms_lob.substr(OBSERVATION,dbms_lob.getlength(OBSERVATION),1) "OBS",
dbms_lob.substr(RECOMMENDATION) "REC",CVE
FROM testmon1;
c_rec C1%ROWTYPE;
descobs clob;
FSCAN_VULN_TRANS_REC VULN_TRANSFORM_STG%ROWTYPE;
TIMESTAMP varchar2(50);
riskval varchar2(10);
pCTX PLOG.LOG_CTX := PLOG.init (pSECTION => 'foundscanVuln Procedure',
pLEVEL => PLOG.LDEBUG,
pLOG4J => TRUE,
pLOGTABLE => TRUE,
pOUT_TRANS => TRUE,
pALERT => TRUE,
pTRACE => TRUE,
pDBMS_OUTPUT => TRUE);
amount number;
buffer varchar2(32000);
BEGIN
---INITIALIZE THE LOCATOR FOR CLOB DATA TYPE
select observation into descobs from testmon1 where rownum=1;
OPEN C1;
loop
fetch C1 INTO c_rec;
exit when C1%NOTFOUND;
--LOAD THE DESCRIPTION FIELD FROM CURSOR AND WRITE IT TO THE CLOB LOCATOR descobs.
dbms_lob.Write(descobs,dbms_lob(c_rec.DESCR),1,c_rec.DESCR);
------APPEND THE OBSERVATION FIELD FROM CURSOR TO THE CLOB LOCATOR descobs.
dbms_lob.Writeappend(descobs,dbms_lob(c_rec.DESCR),c_rec.OBS);
-- dbms_output.put_line ('the timestamp is :'||c_rec.scanstarttime);
--dbms_lob.write(descobs,amount,1,buffer);
descobs:=c_rec.OBS;
--dbms_lob.read(descobs,amount,1,buffer);
--dbms_lob.append(c_rec.DESCR,c_rec.OBS);
--descobs:=c_rec.OBS;
--dbms_output.put_line ('the ADDED DESCROBS is :'||dbms_lob.substr(c_rec.DESCR,dbms_lob.getlength(c_rec.DESCR),1));
dbms_output.put_line ('the ADDED DESCRIPTION AND OBSERVATION is :'||descobs);
--dbms_output.put_line ('the DESCROBS buffer is :'||buffer);
SELECT DESCRIPTION INTO FSCAN_VULN_TRANS_REC.DESCRIPTION
FROM TESTMON1 WHERE ROWNUM=1;
---------LOAD THE DESCRIPTION+ observation value into the target table description
DBMS_LOB.WRITE(FSCAN_VULN_TRANS_REC.DESCRIPTION, dbms_lob.getlength(descobs),1,descobs);
TIMESTAMP:=substr(c_rec.scanstarttime,1,10)||' '|| substr(c_rec.scanstarttime,12,8);
IF c_rec.risk <3
THEN riskval:='Low';
ELSIF c_rec.risk <6
THEN riskval:='Medium';
ELSIF c_rec.risk <10
THEN riskval:='High';
END IF;
FSCAN_VULN_TRANS_REC.TIMESTAMP:=TO_DATE(TIMESTAMP, 'YYYY/MM/DD HH24:MI:SS');
FSCAN_VULN_TRANS_REC.risk:= riskval;
--dbms_lob.append(c_rec.DESCR,c_rec.OBS);
FSCAN_VULN_TRANS_REC.DESCRIPTION:=c_rec.DESCR;
FSCAN_VULN_TRANS_REC.RECOMMEND:=c_rec.REC;
FSCAN_VULN_TRANS_REC.LocalID:=to_number(c_rec.FAULTLINEID);
FSCAN_VULN_TRANS_REC.SCANTYPE:='FOUNDSCAN';
FSCAN_VULN_TRANS_REC.CVE_ID:=c_rec.CVE;
FSCAN_VULN_TRANS_REC.VULNERABILITY_NAME:=c_rec.VULNNAME;
-- dbms_output.put_line ('the plog timestamp is :'||timestamp);
-- dbms_output.put_line ('the timestamp is :'||riskval);
--dbms_output.put_line ('the recommend is :'||FSCAN_VULN_TRANS_REC.RECOMMEND);
--dbms_output.put_line ('the app desc is :'||FSCAN_VULN_TRANS_REC.DESCRIPTION);
insert into test_target values FSCAN_VULN_TRANS_REC;
End loop;
close C1;
commit;
EXCEPTION
WHEN OTHERS THEN
-- dbms_output.put_line ('Data not found');
-----------dbms_output.put_line (sqlcode|| ':'||sqlerrm);
end proc1;
using dbms_lob package is not helping. Either DB stops responding. Or the Observation field ( which has max length >300000) can not be loaed into a CLOB variable.
Please help or give me a sample code that helps.select
BANKING_INSTITUTION.BANK_REF_CODE C1_BANK_ID,
BANKING_INSTITUTION.NAME_BANK C2_BANK_NAME,
BANKING_INSTITUTION.BANK_NUMBER C3_BANK_NUMBER,
BANKING_INSTITUTION.ISO_CODE C4_GBA_CODE,
BANKING_INSTITUTION.STATUS C5_STATUS,
BANKING_INSTITUTION.SOURCE C6_SOURCE,
BANKING_INSTITUTION.START_DATE_BANK C7_START_DATE,
BANKING_INSTITUTION.ADDRESS_BANK C8_BANK_ADDRESS1
from REF_DATA_DB.BANKING_INSTITUTION BANKING_INSTITUTION
where (1=1)
insert /*+ append */ into XXSVB.C$_0XXSVB_BANKS_STAGING
C1_BANK_ID,
C2_BANK_NAME,
C3_BANK_NUMBER,
C4_GBA_CODE,
C5_STATUS,
C6_SOURCE,
C7_START_DATE,
C8_BANK_ADDRESS1
values
:C1_BANK_ID,
:C2_BANK_NAME,
:C3_BANK_NUMBER,
:C4_GBA_CODE,
:C5_STATUS,
:C6_SOURCE,
:C7_START_DATE,
:C8_BANK_ADDRESS1
) -
How to load data into 3 different target tables usin BODS ?
Hello Friends,
I have 5 different source tables with same field definitions, Now I want to load all the records into three/four different target tables (Flat file, SQL Server, XML, and Oracle ) Could anyone please tell me how to do this task ?
Thanks in Advance,
Bheem.Hello Bheem,
You can create separated dataflow for each target as suggested by Bala, this is a good choice when evaluating you scenario.
If you put all targets in the same dataflow you may experience problems if one of them is down (as you have different servers as targets).
BODS will send the data simultaneously to all targets and when one fails, the load will be break and you may have the tables not sinc anyways (if you plan to use a single dataflow to avoid this situation, it won't do it).
So the best option is to create separated dataflow and put inside another one so you can run a singe dataflow that will call each one of the target and if onw fails the other will complete accordingly.
Then if you put them inside a error trapping, you may even make your dataflow to retry the load prior abend the job.
Think about cascading your dataflows and let the leaf level simple as it can be so it will be easier to schedule and debug your process.
Pay attention to datatypes and other conversions you might need when working with more than one source/target.
Regards, -
How to get source table name according to target table
hi all
another question:
once a map was created and deployed,the corresponding information was stored in the repository and rtr repository.My question is how to find the source table name according to the target table,and in which table these records are recorded.
somebody help me plz!!
thanks a lot!This is a query that will get you the operators in a mapping. To get source and targets you will need some additional information but this should get you started:
set pages 999
col PROJECT format a20
col MODULE format a20
col MAPPING format a25
col OPERATOR format a20
col OP_TYPE format a15
select mod.project_name PROJECT
, map.information_system_name MODULE
, map.map_name MAPPING
, cmp.map_component_name OPERATOR
, cmp.operator_type OP_TYPE
from all_iv_xform_maps map
, all_iv_modules mod
, all_iv_xform_map_components cmp
where mod.information_system_id = map.information_system_id
and map.map_id = cmp.map_id
and mod.project_name = '&Project'
order by 1,2,3
Jean-Pierre
Maybe you are looking for
-
How do I make my iPad turn off when the screen is covered?
My old iPad would turn off when I closed the cover but I cannot find how to make the iPad air turnoff in a similar fashion?
-
Restoring my imac from an external harddrive
hi, i have made a backup using time machine on my imac 5 days ago onto an external hard drive. and i have started deleting stuff off my computer and noticed that the time machine had started making back ups automatically everyday. but now i would lik
-
Can't find Facebook Log at the bottom right of Iphoto
I can not see or find the Facebook logo at the bottom right of the iphoto screen? Can anyone help
-
Re-configure input message in XI before output to R/3
Our system is running XI3.0 sp12,oracle 9.2.0.6 on windows 2003. I have a requirement to process a file > XI > RFC to R/3 Enterprise. The down side is, the file is not in the right format for me, so I think I will have to re-configure it through XI.
-
Com.sun.javadoc pakage
whenI try to import the package "com.sun.javadoc" I got the following as a result: package com.sun.javadoc does not exist How can I use such a package? And how can I us the mehod "isclass()" from this package?