How to add _BATCH_LAST_RUN_ to the dataflow built with SQL


I am trying to find a way to add BATCH_LAST_RUN column to one of the datasets I have created. I found A way - s to change replace method to append. In this particular dataset, I am grabbing the last 7 days' worth of data, so I need to replace the whole dataset on each run.

Is there any way to add this column with replace method fro SQL dataflow?

Thank you!


  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟤

    You can use the GETDATE() function to generate the current date and time in Microsoft's SQL

    SELECT GETDATE() AS Batch_Last_Run

    FROM tablename

    If you are using MySQL, you would use CURRENT_TIMESTAMP


    FROM tablename