Commenting queries in tSQLrow

Highlighted

Commenting queries in tSQLrow

Hi,
I have used multiple queries in tSQLRow to test various test cases of data inserted. Say I have 5 queries, and I want to have only 2 queries running, how do I comment non-required queries in the query editor???
Example:
//select count(*) from sample_log;
or
--select count(*) from sample_log;
Highlighted
Five Stars

Re: Commenting queries in tSQLrow

If you want to do this, you're probably better of defining a global variable in tJava, where you can comment out the different assignments. You can then reference this in your tSQLRow.
Highlighted
Seventeen Stars

Re: Commenting queries in tSQLrow

Talend has the annoying behavior the remove all line breaks an therefor a line comment will hide all following sql code even the code in all following lines.
I suggest you use the block comment /* comment */. This kind of comment will processed correctly.

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 2

Part 2 of a series on Context Variables

Blog

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