GitHub user KBoersch added a comment to the discussion: How to get data from a database with a constructed query?
I'm doing this exactly the way you don't like. I build these conditions and set them as variable or depending on the requirements just as parameter. You could work with a sub-pipeline receiving just the complete sql as parameter instead of seting it as variable. The subpipeline then uses the received param in a table input step. At least you're not seting any global variables then. That's the "easy way". If you don't want to do this, imho there is no way around a more complicated approach like dynamic sql row. Another idea that comes to my mind is using something like a temp-table you're producing via SQL Script transform/action that creates a table with the data you wanna receieve based on your condition. After success you can then use table input with a normal select xy from z on this table with the prefiltered data. I did something similar before, when I didn't want to use hop to directly read out the data. But I'm not sure if it works with your scenario. Hope my answer was somehow helpful. Greetings Kai GitHub link: https://github.com/apache/hop/discussions/4566#discussioncomment-11256463 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
