I am attempting to create a flow, triggered in Power BI that will send an approval email containing a table of data and once approved the data within a specified sql table needs to be completely replaced with this new data. This is what I have managed so far
So at the moment when I press the button in PowerBI it send a recipient an approval email, once approved it writes the data into the specified sql table. Problem is it only add the data to the table, so the old data is still there. I need it to completely replace all of the data.
I was considering using Update rows but I ran into another obstacle. The data inserted into the table is not always the same length, example sometimes I have 5 rows to insert and other times 15. Is there a way to work around this somehow? Perhaps by deleting all the old data first and then reinserting the new data or something? I'm just not sure how to go about this.