RowNo with parameter?

Hello All,

Currently I am trying to append rows to an existing table using easy morph. So my intention is to get the Maximum key from a source table and add +1 and so on for every row that is generated, so I can insert with correct key for the appended rows.

for example the maximum key in the source table is 3000. And I am generating around 100 records to be written to target table.

In this case, for the 100 rows I generate, it needs to have one column with value as 3001 for first row, 3002 for second row, etc.,

Is this possible in easymorph?

Hi @kaleelahamed,

you will need to get Max key from the source table then bring it into the table with new records using the Peek transformation (see Tutorial: Transformations for merging data). Then you can calculate new keys as row number + Max key.

See the example below. “Season” is the key field in it.

Teams.sqlite (7 KB)
db_append.morph (4.9 KB)

Thank you so much :clap:. This is really helpful. With the idea you provided, I was able to do clean task end to end for my simple requirement :slight_smile:

1 Like