Skip to main content
Solved

split single record to multiple records

  • November 30, 2016
  • 4 replies
  • 204 views

Hi,

I want to split one record in table2 into multiple records based on attribute value from table1. There is no geometry in both tables. The picture shows what I want to achieve:

Thanks for helping.

Best answer by mark2atsafe

I would try using a FeatureMerger to merge table 1 and 2 using ID and Type as the keys to match. Set it up to process duplicate suppliers and to create a list. Then use the ListExploder to explode that list. That should give you the features as shown in the target table

View original
Did this help you find an answer to your question?

4 replies

erik_jan
Contributor
Forum|alt.badge.img+19
  • Contributor
  • November 30, 2016

My first thought:

Create lines for each record (using two VertexCreators and 0 as a Y Value).

Then use the SpatialFilter (test on CONTAINS and EQUALS) to match the records from table 1 on table 2 (using Group by ID and TYPE.

Merging the attributes should give table B after retrieving the FROM and TO from the geometry by using two CoordinateExtractors (X Value from index 0 = FROM, index 1 = TO).


mark2atsafe
Safer
Forum|alt.badge.img+49
  • Safer
  • Best Answer
  • November 30, 2016

I would try using a FeatureMerger to merge table 1 and 2 using ID and Type as the keys to match. Set it up to process duplicate suppliers and to create a list. Then use the ListExploder to explode that list. That should give you the features as shown in the target table


takashi
Evangelist
  • December 1, 2016

I agree that the FeatureMerger can be used here. However, since there is an unclear portion in the merging rule, an additional process might be necessary depending on the rule. The unclear portion is:

In the target table, the FROM and TO values in the blue rows have come from the table 1, but the values in other rows have come from the table 2. What is the rule to distinguish them?


  • Author
  • December 1, 2016
takashi wrote:

I agree that the FeatureMerger can be used here. However, since there is an unclear portion in the merging rule, an additional process might be necessary depending on the rule. The unclear portion is:

In the target table, the FROM and TO values in the blue rows have come from the table 1, but the values in other rows have come from the table 2. What is the rule to distinguish them?

Thanks for mentioning the unclear portion: in this case I have not posted all the data in table 1 which can merge with the non-blue rows in table 2.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings