Six 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

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Multiple SQL statement in one component

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

8 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.
Six 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.
Six 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;
"

Twelve 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
Twelve Stars

Re: Multiple SQL statement in one component

did my solution help you?

Manohar B
Six Stars

Re: Multiple SQL statement in one component

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

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