Multiple SQL Statements in DB SQL Executer lead to parsing errors

Hello all,
we’ve got the following problem:
We are currently switching from legacy sql executor to the most recent version and found the new feature “support multiple sql statements”. We definitly need to use this feature! The problem occurs, when the code contains the character which is used as sql statement seperator. With the classic nodes that was no problem, presumably since the code simply transferred the code to hive and the the hive parser is able to handle it. Unforntunately the parser used within the knime sql nodes is a bit weaker and crashes; see example with the semikolon contained within the string. Changing the separator is also no option since we are facing A LARGE alphabet of characters, almost the complete ISO 8859 * codepages. Hence, there is always a risk that the script got parsed the wrong way when the separator character appears in the code (and it´s not easy to avoid such code for several reasons)… We´d rather like to get to know a way how to say the parser, that this is a seperator and this part of the code/or string. Something like an escape sequence could probably help a bit but would only reduce the risk mentioned above. A better parser or a differen node with more capabilities would be a better solution.
I attached an example workflow to illustrate the problem.
Thanks a lot for any hint.
example_parsing_problem.knwf (16.3 KB)

Hello hestoelt,
you can use several characters as delimiter including special characters like \n for new line. So to simulate the behavior of the legacy Database SQL Executor you can use ;\n as separator in the new node. I will update the documentation to reflect his better.
Bye
Tobias

4 Likes

Hello, thanks for the hint, that worked well!

2 Likes