Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
My idea is to :
1. count the delimiters per line
tjavarow
output_row.line = input_row.line;
context.DelCount = StringHandling.COUNT(input_row.line, ";");
2. gather rows not equal the default delimiters value
tmap => Expression filter
context.DelCount < 10
3. Finally i used a tjavaflex to check if i have any rejection.
if(nb==0){
globalMap.put("hasData",false);
}else {
globalMap.put("hasData",true);
What i am not able to do:
If there is any rejection ("hasData",true), i want to output all the rows in a file then finally die.
tjavaflex cannot get the schema from the tmap i guess.
Any idea how to handle this?
Best regards,
asadasing
@rhall
If another word i want to output the file only if it contain a row