I found following strange behaviour of the tWriteJSONfield component. It change the order of the rows processing.
There is an XML file with 2 records, i.e. <fileName>aaa.pdf</fileName><fileName>bbb.jpg</fileName>. Without tWriteJSONfield, 2 rows are processed by all components consequentially:
But when I add tWriteJSONfield, both rows are processed first by components located before tWriteJSONfield, and then both rows are processed by the rest of components:
It is criticall in my case because I use global variables for each row. Why it behave such way? Is it as designed?
This should be the known component behaviour. such as, tAggregate and tDenormalize components may change input order.
What does your current use case look like?
First of all it is generally not a good thing when execution order is not transparent.
I faced this issue because I use global variable which I set for the row. I set global variable before tWriteJSONField component. And I need to get this variable after tWriteJSONField component. And because of this behaviour, I can get value only for the last row.
Would you mind posting your current setting of global variable screenshot on forum so that we can see if there is any workaround for your scenario?
Here it is:
1) generates 2 random rows
2) set random value to global variable
3) call tWriteJSON (doesnt really matter what it do)
4) get global variable value using tMap. The value is always same, the last one generated
tLogRow_5 displays only value for the last row
Hi Sabrina, any news on that? I found a workaround (using Java code) but I think this is an issue in Talend and should be fixed
So far, we don't have a better workaround on execution order issue. Feel free to create a jira issue on talend bug tracker.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend