I have a requirement , in which i have a sql query and i need to classified the output to default value ex:-TEST
The sql query has one column and it will fetch me 100 rows with different id's
Now once i get the output i need to pass a default value 'TEST' to that column
query is : select * from table where id<=5 , i need to pass this query and generate output as below
ex: if the query gives me 5 rows , With different values like below
My output should be
Basically i need to classify using the query .
how shall i do it using talend?
Please help will be appreciated.
It sounds like you want to mask your data. You have two ways:
1. Your mapping. A tMap will typically map the input_row.id --> out_row.id. Your mapping expression can be a constant. So out_row_id can be simply mapped to a constant "TEST".
2. You can also explore the Data Masking features available in Talend, very flexible and versatile. Watch this video for a quick demo:
If you want your value to be a parameter, check how to use Context variables here: