Adding new row to the table depending on if statement

Hi, I am performing some operations on my data stream in Flux and I want to add new records in the middle of a table or optionally to a new table if a certain condition is met.
Example data:

So let’s say that when “status” is “offline”, I would like to add a row with a timestamp a minute later (in this case 2023-05-28T00:04:29Z) and a “newColumn” column with the value “machine_offline” to this table or to some temporary table where I will store only these added rows and return them as the result of the query.

I thought map() could do this, but this function only allows to return one row, so I can’t return, for example, the union of the base row and the created.

Is there a way to somehow iterate over the table creating new row each time when this certain condition is met?