Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

Combine two datasets


Raman Shah 3

Recommended Posts

I have two sets of data (same schema):

Account Id, Name, Status, EngineType

One data set has 5 recs --> accountId = 100, 101, 102, 103, 104 but Engine type is blank

ID Name Status Engine Type

100 Name1 OK

101 Name2 OK

102 Name3 Fail

103 Name4 OK

104 Name5 OK

Second data set has two records: AccountId 102, enginetype: Jet, AccountId: 103, engine type: Gasoline

ID Name Status Engine Type

102 Name2 Fail Jet

103 Name3 OK Gasoline

The final datashould have five records:

AccountId 100, 101, 104 will have enginetype = blank and accointid 102, - enginetype: Jet, Accountid 103 - engine type:Gasoline

ID Name Status Engine Type

100 Name1 OK

101 Name2 OK

102 Name3 Fail Jet

103 Name4 OK Gasoline

104 Name5 OK

Seems staright forward but not working for me.

Link to comment
Share on other sites

I tried nested iterate loop.  Inner loop has 5 record but enginetype blank and acumulating.  Outer loop has two records AccountId 102, enginetype: Jet, Accountid 103, enginetype: Gasoline.

 

As the loop is traversed I see each record in inner loop one by one for each record of outer loop.

 

In Outer loop when account id 102 and  accoint id id= 102 in inner loop I see enginetype getting populated as Jet as expected.

 

But during next iteration of outer loop when Accountid = 103 in inner loop Accountid 102 did not retain update from previous iteration of outer loop. For Accountid 102 engine type is blank for this iteration. For Accountid 103 engine type is populated as Gasoline.

 

I tried to access data from previous iteration of outer loop but was unsuccessful.

 

How to retain the update from previous iteration of outer loop

 

Perhaps iteration is not the correct solution.  Is there a different way of accomplishing this

 

Thanks for your help.

Link to comment
Share on other sites

×
×
  • Create New...