Passing data over If condition

Five Stars

Passing data over If condition

 i am using using javaflex. In invalid output, i am setting context variable and checking it on "IF" condition. Now condition is working fine. But i am unable to send main data output to the SqlOutput. After if condition of javaflex i am getting only one row rather than entire parsed data.

Fifteen Stars TRF
Fifteen Stars

Re: Passing data over If condition

Hi,
That's a normal behaviour.
I suggest you to read the documentation regarding the tJava family components.
For your case you need to push the data to a tHashOutput then, depending on your condition, get it from a tHashInput connected to this tHashOutput.
Cannot give more details as I don't know what's in the tJavaFlex components.

TRF
Highlighted
Ten Stars

Re: Passing data over If condition

tJavaFlex IF is a trigger, it's not possible... some components allow you to link an IF to a (row) component.

What would you like to achieve, what is your IF based on, specific row.column value?

and based on its value you like to write row output to, in example, a file A and if its not write to file B?

 

 

Community Manager

Re: Passing data over If condition

What are you trying to achieve here? I ask as you are processing 108852 rows just prior to this. The RunIF will fire ONCE per component completion. If you want it to fire 108852 times, you will need to use a tFlowToIterate and iterate over the each individual row. However, this will be a very lengthy process with 108852 rows.

 

Alternatively you can apply your IF logic in the tMap and filter the rows that are returned by that logic. Then you can just send your data that is output straight to your tPostgreSQL. You can see how to do that here:

https://community.talend.com/t5/custom/page/page-id/Filtering-data-tMap-component

Five Stars

Re: Passing data over If condition

But i want to store the data if there is no "Invalid parser output". If any parser error i am setting(context variable X) flag value as true else false in "tJavaflex_3" . Based on this context variable(X) i want to store the final output. If condition between tJavaflex_4 and tJavaflex_5
is validating the context variable (X).
Five Stars

Re: Passing data over If condition

But i want to store the data if there is no "Invalid parser output". If any parser error i am setting(context variable X) flag value as true else false in "tJavaflex_3" . Based on this context variable(X) i want to store the final output. If condition between tJavaflex_4 and tJavaflex_5
is validating the context variable (X).

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read