Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] Using TJavaRow for conditional flow control

Hello everyone,

I am comparatively new to Talend and am trying to establish certain checks towards my data integration process which picks up data from an SFTP and copies it to Redshift Datawarehouse.

As a part of this process, I intend to validate my column names to ensure that before I pick up my data, the header names are validated. To do the same, I am reading the header row of my file using 
tFileInputFullRow (with limit=1) and want to use TJavaRow to do a boolean check on the variable name.
 tFileInputFullRow----tJavaRow--tJava--if(false)--take action
                                               |
                                            If(True)
                                                |
                                           tFileInputDelimited


To be more specific, I am facing issues in the step where we use TJavaRow component to write the Java query:

context.result= line1.equalsIgnoreCase("col1,col2,col3");

I am using the following query:

"Boolean result = false;
globalMap.put("result",result);

result=row4.equalsIgnoreCase("list_id,list_name,campaign_id,template_name,event,event_date,email");
"

Could you kindly help me out in sorting the variable result to get the desired output.
I guess there is some problem in the underlined part of the Java code.

Thanks and Regards,
Shobhit

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi 
To access the input column, use this expression:
Boolean result=false;
result="list_id,list_name,campaign_id,template_name,event,event_date,email".equalsIgnoreCase(input_row.line);
globalMap.put("result",result);

Best regards
Shong

View solution in original post

1 Reply
Anonymous
Not applicable

Hi 
To access the input column, use this expression:
Boolean result=false;
result="list_id,list_name,campaign_id,template_name,event,event_date,email".equalsIgnoreCase(input_row.line);
globalMap.put("result",result);

Best regards
Shong