Delete records in datastore | Control Tower


I have a BP running on local control tower in which I create datastore and insert data into it from an excel file.
But when I try to delete records in datastore (through sql query/ manually selecting “Delete All Records”) nothing happens.

Code for deleting records in datastore:

delete from @this;

Following code generates an exception:
Caused by: org.postgresql.util.PSQLException: ERROR: INSERT has more expressions than target columns
Where: PL/pgSQL function archivedeletedrecords() line 1 at EXECUTE

As per my understanding insert statement has more values than columns but I don’t understand how insert query runs from my code and what is archivedeletedrecords().