1.
When I try to add " <DBConnection id="InterbaseDB" dbConfig="interbase.cfg"/>" in graph as given below, The graph could not be saved and it deletes the node <DBConnection>...what s the mistake in this code.
<?xml version="1.0" encoding="UTF-8"?>
<Graph name="TestingExecute">
<Global>
<DBConnection id="InterbaseDB" dbConfig="interbase.cfg"/>
</Global>
<Phase number="0">
<Node id="DBEXEC" type="DB_EXECUTE" dbConnection="InterbaseDB" inTransaction="N">
<SQLCode>
create table EMPLOYEE
(
EMP_NO NUMBER not null,
FIRST_NAME VARCHAR2(15) not null,
LAST_NAME VARCHAR2(20) not null,
PHONE_EXT VARCHAR2(4),
HIRE_DATE DATE not null,
DEPT_NO CHAR(3) not null,
JOB_CODE VARCHAR2(5) not null,
JOB_GRADE NUMBER(4,2) not null,
JOB_COUNTRY VARCHAR2(15) not null,
SALARY NUMBER(15,2) not null,
FULL_NAME VARCHAR2(35)
);
insert into employee
values(2,'Robert','Nelson','250',28/12/1988,'600','VP',2.0,'USA',105900.0,'Nelson, Robert');
insert into employee
values(4,'Bruce','Young','233',28/12/1988,'621','Eng',2.0,'USA',97500.0,'Young, Bruce');
insert into employee
values(5,'Kim','Lambert','22',06/02/1989,'130','Eng',2.0,'USA',102750.0,'Lambert, Kim');
insert into employee
values(8,'Leslie','Johnson','410',05/04/1989,'180','Mktg',3.0,'USA',64635.0,'Johnson, Leslie');
insert into employee
values(9,'Phil','Forest','229',17/04/1989,'622','Mngr',3.0,'USA',75060.0,'Forest, Phil');
</SQLCode>
</Node>
</Phase>
</Graph>
2. Again, i want to use <DBConnection> as follows instead of using .cfg file. Is there any mistake in given node:
<DBConnection id="InterbaseDB"
dbDriver="oracle.jdbc.OracleDriver"
dbURL="jdbc:oracle://190.160.1.100/mydb"
user="scott"
password="tiger" />
When I try to add " <DBConnection id="InterbaseDB" dbConfig="interbase.cfg"/>" in graph as given below, The graph could not be saved and it deletes the node <DBConnection>...what s the mistake in this code.
<?xml version="1.0" encoding="UTF-8"?>
<Graph name="TestingExecute">
<Global>
<DBConnection id="InterbaseDB" dbConfig="interbase.cfg"/>
</Global>
<Phase number="0">
<Node id="DBEXEC" type="DB_EXECUTE" dbConnection="InterbaseDB" inTransaction="N">
<SQLCode>
create table EMPLOYEE
(
EMP_NO NUMBER not null,
FIRST_NAME VARCHAR2(15) not null,
LAST_NAME VARCHAR2(20) not null,
PHONE_EXT VARCHAR2(4),
HIRE_DATE DATE not null,
DEPT_NO CHAR(3) not null,
JOB_CODE VARCHAR2(5) not null,
JOB_GRADE NUMBER(4,2) not null,
JOB_COUNTRY VARCHAR2(15) not null,
SALARY NUMBER(15,2) not null,
FULL_NAME VARCHAR2(35)
);
insert into employee
values(2,'Robert','Nelson','250',28/12/1988,'600','VP',2.0,'USA',105900.0,'Nelson, Robert');
insert into employee
values(4,'Bruce','Young','233',28/12/1988,'621','Eng',2.0,'USA',97500.0,'Young, Bruce');
insert into employee
values(5,'Kim','Lambert','22',06/02/1989,'130','Eng',2.0,'USA',102750.0,'Lambert, Kim');
insert into employee
values(8,'Leslie','Johnson','410',05/04/1989,'180','Mktg',3.0,'USA',64635.0,'Johnson, Leslie');
insert into employee
values(9,'Phil','Forest','229',17/04/1989,'622','Mngr',3.0,'USA',75060.0,'Forest, Phil');
</SQLCode>
</Node>
</Phase>
</Graph>
2. Again, i want to use <DBConnection> as follows instead of using .cfg file. Is there any mistake in given node:
<DBConnection id="InterbaseDB"
dbDriver="oracle.jdbc.OracleDriver"
dbURL="jdbc:oracle://190.160.1.100/mydb"
user="scott"
password="tiger" />
-
Hello,
DBConnection is unknown graph element. DB Connection must be defined as Connection with type="JDBC" (see Connections), so your connection should look like:
or<Connection dbConfig="interbase.cfg" id="Interbase" type="JDBC"/>
<Connection type="JDBC" id="InterbaseDB" dbDriver="oracle.jdbc.OracleDriver" dbURL="jdbc:oracle://190.160.1.100/mydb" user="scott" password="tiger" />
-
I find dbConfig="interbase.cfg". Do we need this .cfg file when we are giving all database details in db connection node. What ned to be written in this cfg file ? -
DB connection can be defined internally in the graph - all needed properties are directly in graph or externally - all properties are in external file and in the graph you have only the path to this external file. So, as I've written above, your connection definition in graph should look like:
with the interbase.cfg content:<Connection dbConfig="interbase.cfg" id="Interbase" type="JDBC"/>
dbDriver=oracle.jdbc.OracleDriver
dbURL=jdbc:oracle://190.160.1.100/mydb
user=scott
password=tiger
or<Connection type="JDBC" id="InterbaseDB" dbDriver="oracle.jdbc.OracleDriver" dbURL="jdbc:oracle://190.160.1.100/mydb" user="scott" password="tiger" />
-
Thanks. -
The update query in a graph with DB Execute is not getting executed where the same query is running form sql plus:
<Node dbConnection="Connection0" enabled="enabled" guiName="DBExecute" type=DB_EXECUTE" id="DB_EXECUTE0">
<attr name="sqlQuery"><![CDATA[UPDATE tableA set DATE_A = TO_DATE('12-12-2007 22:22:22', 'DD-MM-YYYY HH24:MI:SS') WHERE TABLE_NAME='abc']]></attr></Node>
If I replace the update with insert query its running fine.
any suggestion where can be the problem... -
Hello,
I executed this node and the table was updated. Do you have proper name in where clause (lower/upper case)?
What CloverETL version do you use?
Can you show whole your graph?
Please sign in to leave a comment.
Comments 6