Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

add to data flow using tjavaflex

Hello, how can i add rows inside tjavaFlex or twebserviceinput java tab?
Labels (3)
9 Replies
Anonymous
Not applicable
Author

Hi  dudum,
What's your job requirement? Do you want variable value in parameters of tWebserviceInput from previous component(tjavaflex)?
Can you please explain your request with some example data so that we can give you more accurate answers.

Best regards
Sabrina
Anonymous
Not applicable
Author

Well , I have tjavaflex component and i want to generate new output rows (flow),from the java code.
what i mean it is not based on input component, just generate them in the code and output as flow
Anonymous
Not applicable
Author

hi,
try something like :
output_row.yourfield =  your calculed value (calling a routines or not);


regards
laurent
Anonymous
Not applicable
Author

You can do this in a simple way by doing something like the following.....
Start Code
for(int i = 0; i<10 ; i++){

You are opening a FOR loop here, but not closing it.

Main Code
row1.column1 = "Column1";
row1.column2 = "Column2";
row1.column3 = "Column3";

You are creating your data row here. I am assuming an output row named "row1" and a schema with the columns used above.
End Code
}

You are closing the FOR loop here.
If you plug that in, you will generate 10 rows of data.
Anonymous
Not applicable
Author

right rhall,
output_row.yourfield

is syntax for tJavaRow (never understood why 2 differents ways) 0683p000009MA9p.png
Anonymous
Not applicable
Author

I always get caught out kzone. It should just use the input and output row names as far as I am concerned.
Anonymous
Not applicable
Author

i like the way " input_ & output_ syntax"  ...  they are independant of the name's flow (and the fact that propagation not always efficient 0683p000009MA9p.png
regards
laurent
Anonymous
Not applicable
Author

so the number of loops i make in the start row , the flow output will be?
Anonymous
Not applicable
Author

If you set the loop to iterate 10 times, you will get 10 rows generated.