Skip to main content
Solved

Copy content of the table

  • May 1, 2018
  • 2 replies
  • 25 views

Forum|alt.badge.img

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:

Best answer by redgeographics

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • Best Answer
  • May 1, 2018

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.


takashi
Celebrity
  • 7843 replies
  • May 1, 2018

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.