Four Stars

[resolved] tablecreate component using JDBC

Hi,
I have created JDBC connection in repository, the database connection property may change during execution from mysql to postgress... how can I create table using tTableCreate component using this connection.
Is this supported or not?
I am using TOS 5.3
Vaibhav
1 ACCEPTED SOLUTION

Accepted Solutions
Four Stars

Re: [resolved] tablecreate component using JDBC

Here is a work around for table creation using query with JDBCRow... Pl check the screenshot...
- Put your query in context variable
- use tnromalize with ; as separator
- set results to another context variable
- use that variable value n tJDBCRow
Vaibhav
6 REPLIES
Four Stars

Re: [resolved] tablecreate component using JDBC

Executing multiple queries is not allowed using tJDBCRow component?? is if possible?
Vaibhav
Four Stars

Re: [resolved] tablecreate component using JDBC

How can i create a database having multiple tables using SQL query with JDBCRow component?
Any logical work around?
Vaibhav
Moderator

Re: [resolved] tablecreate component using JDBC

Hi,
I have created JDBC connection in repository, the database connection property may change during execution from mysql to postgress... how can I create table using tTableCreate component using this connection.

It's not possible currently. Table list cannot link to tjdbcconnction connection.
It suggest you should open a work item/ feature jira issue of DI project.

Executing multiple queries is not allowed using tJDBCRow component?? is if possible?

Usually, we use update "Additional JDBC Parameters" to include "allowMultiQueries=true" then execute multiple SQL statements with one tXXXRow(tMysqlXXX) component, however, here is no configuration parameter "Additional JDBC Parameters" field in tJDBCRow.(Execution may stop after the first semi-colon.)
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] tablecreate component using JDBC

Here is a work around for table creation using query with JDBCRow... Pl check the screenshot...
- Put your query in context variable
- use tnromalize with ; as separator
- set results to another context variable
- use that variable value n tJDBCRow
Vaibhav
Community Manager

Re: [resolved] tablecreate component using JDBC

Here is a work around for table creation using query with JDBCRow... Pl check the screenshot...

Fine. Actually, the job iterates each query and execute one by one.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: [resolved] tablecreate component using JDBC

Yep, I missed to write that statement about iteration...
Vaibhav