Stored procedure creation problem

One Star

Stored procedure creation problem

Hi,
I want to create a MySQL stored procedure with Talend but i have a problem. Indeed, the first thing to create a stored procedure is to change the delimiter from ";" to another.
I try to do this in a SQL Query :
DELIMITER //

But Talend answers me :
Exception in component tMysqlRow_1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Erreur de syntaxe près de 'DELIMITER //

It means that there is a syntax error when i try to execute this command whereas this command should work !
Without this command, i can't create my stored procedure because Talend thinks that each ";" is an instruction.
Is anyone have an idea to solve this problem please ?
Thanks for help.
One Star

Re: Stored procedure creation problem

I know this is a really old post, but I ran into the same issue.

The fix is to remove the offending statement. DELIMITER is actually a MySQL client keyword, not actual SQL. Remove that statement and it should work (be sure to also remove the // at the end of your statement as well).

Also, it turns out Talend puts everything on one long line when sending it to the server, so your routines and triggers may look unsightly when viewed in Workbench. However, you can fix this by ending each line of your SQL statement with \n or \r; it even understands the line breaks when put at the end of SQL comments or from within multi-line comments.

I hope this info helps others with this issue.

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download