Multiple SQL statement in one component

Eight Stars

Multiple SQL statement in one component

How to execute multiple sql statements in one component .. Please let me know 

 

I am using Snowflake DB


Accepted Solutions
Eight Stars

Re: Multiple SQL statement in one component

I used tFileDelimited component and in the text file i had all the SQL statement 

View solution in original post


All Replies
Moderator

Re: Multiple SQL statement in one component

Hello,

Do you want to use multiple sql statement in sql query field of tSnowFlakeInput component?

Have you already checked 'Manual query' check box and entered within double quotation marks in the Full SQL query string field?

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.
Eight Stars

Re: Multiple SQL statement in one component

I am using Talend 6.2.1 version i dont see tSnowflake component So i am using tJDBC component

Moderator

Re: Multiple SQL statement in one component

Hello,

Here exists a new feature jira issue about 'Integrate SnowFlake Components'

https://jira.talendforge.org/browse/TDI-38068

This issue has been fixed on V 6.4.1.

For tJDBCROW component, maybe you can add commit keyword in your query.

"Begin

UPDAT.....;

UPDAT.....
Delete from.....;
commit;

end;"

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.
Eight Stars

Re: Multiple SQL statement in one component

Got below error 

"

Multiple SQL statements in a single API call are not supported; use one API call per statement instead.

end;
"

Forteen Stars

Re: Multiple SQL statement in one component

creat a store procedure for those multiple sql's and use tJDBCSP comonent to execute that store procedure.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: Multiple SQL statement in one component

did my solution help you?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Eight Stars

Re: Multiple SQL statement in one component

I used tFileDelimited component and in the text file i had all the SQL statement 

View solution in original post

One Star

Re: Multiple SQL statement in one component


@Karuetlwrote:

I used tFileDelimited component and in the text file i had all the SQL statement 


Hi,

 

Can you please give more detail as to how you did this?  I have exactly the same requirement.

 

Kind regards

Marius

Employee

Re: Multiple SQL statement in one component

Is this issue fixed? I have the same scenario. It's not working. could you pls mark this topic as not solved, we are giving the wrong message to the community group

Employee

Re: Multiple SQL statement in one component

it's not working, we tried using begin .... end; too.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog