Skip to main content

Hello,

How can I copy content of the table?

 


 


For instance, my table looks like this:

Out of above table I would like to create below table:

You can use a Cloner to make 1 copy of each record. If you have the No. field set to autonumber the writer will sort it out, otherwise you can use a Counter to create a new, unique, number for each record.


I like the Cloner use, but there is more than one way. e.g.

  • Divide the data flow into two streams, put a FeatureHolder on one of them, then connect them to a single Counter to update "No." with 1-based sequential number.
  • Create two features with a Creator, connect it to a FeatureReader to read the table twice, then connect a Counter to update "No.".
  • Read the table twice with two readers, send all the feature into a single Counter.
  • InlineQuerier (union two tables with a SQL statement) + Counter, etc...

And, if the source format was CSV and you are using FME 2017+, surprisingly, this workflow does that, since the modern CSV2 reader implements the "feature table" technology.


Reply