Mysql workflow issue

good day ,i need to delete records from mysql database before inserting new records.

what is correct workflow here? obviously i cannot insert Delete node before Insert node as i loose data.
i can manually choose function as input for Insert node, but in execution mode it fails


HI @Edmunds_Priede

Why not use the update operation?
Sorry, if I misunderstood the issue.

in my case i dont need update but delete/insert sequence. also i need to be sure there are new records so i need to execute delete after Function (so i know there are new records). So insert node gets data from Function node. I can manually get data from previous nodes, but it does not work for Mysql node

looks like this works, but i am not sure what the sequence is . i cannot delete after insert

Why can’t you delete and then insert? Like you had it before?
Just make sure to also push the rows to some kind of log so you never lose data if something goes wrong.

i cannot get data from Function node , if i have Delete node in between. maybe i am doing it wrong

i get error if i set Input to Funciton node (one before Delete node) .

Oh thats the issue, I see.
You could do it with a wait and merge. There is a better way probably, but this is an easy one.

Edit: not sure if you need the wait here for example. Don’t think so actually.

ok ill try, but in general , could i get data from previous nodes in my scenario? i can get data from previous nodes in other cases, but not for Mysql

Passthroug is exactly what is was looking for! Thanks

You are completely right, forgot that was an option. :slight_smile:

You can of course also reference the fucntion node to get your data from there, but it would have been more work. As you need to set all seperate fields then.