Could you please elaborate your case with an example with input and expected output values?
I think you can do something like this,
So assuming that your input contains a single column with the alphabets values, you can reference it in the tMysqlInput Component as shown above (row1.alphabet in the screenshot).
If your output is a file, make sure to select the append option so that you can consolidate the filters.
Alternatively you can always do a inner join by having the alphabets as your lookup table. This approach would be easier I think.
Hope you found this helpful.
You can store the "where" clause in a global variable and construct the content of this variable based on your business logic.
Then, in the tMysqlInput, concatenate the variable to the select, giving, not a sql dynamic query (from database point of view), but a query constructed dynamicaly.
Does this helps?
You can use a regex in your SQL expression to filter out the data that your require.
I know it's the same design as before, but it's one of the easiest ways to do this.
You can replace the fixed flow component with an input component based on whether it comes from a file or a database.
Yes. That's one way to do it. Or you can use a tFilterRow or tmap after the sql component and filter the data there.
You could use something like row2.Names.matches((String)globalMap.get("row1.alphabet")+"*") as the filter condition.
yup it should. You can just try giving row1.alphabet. If that doesn't work, then you can explicitly get the value by using the get method,
Also your syntax seems a bit off.
It should be where row1.names like '"+(string)globalMap.get("row1.alphabet")+"%'" i.e make sure your double quotes and single quotes are properly enclosed.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Accelerate your data lake projects with an agile approach