Skip to main content

I've 6 SQL statements in SQL executor. I'm trying to execute these 6 statements only when name_<1-6> value exists. If any of this value is NULL or missing, then that corresponding SQL statement needs to be skipped to avoid error.

 

insert into demo.lu_test values (@Value(id), '@Value(name_1)', 1);

insert into demo.lu_test values (@Value(id), '@Value(name_2)', 2);

insert into demo.lu_test values (@Value(id), '@Value(name_3)', 3);

insert into demo.lu_test values (@Value(id), '@Value(name_4)', 4);

insert into demo.lu_test values (@Value(id), '@Value(name_5)', 5);

insert into demo.lu_test values (@Value(id), '@Value(name_6)', 6); 

 

@david_r​ Please suggest. Thanks!

Hi @fmeuser_gc​ ,

I don't think you can set conditional statements to the SQL Statement parameter in SQLExecutor. Instead, you can create insert statement(s) individually for only valid name_N using some transformers. For example:create-sql-statemtnts


Reply