Clear all data in a table?

Hello everyone!

I’ve looked through the docs, but couldn’t find a function that clears all the table data in a particular table. Basically, I have multiple tables that are connected to multiple Facebook Ad Accounts, which then INSERT appropriate row data based on Campaign filters, etc. into another consolidated table.

Currently, this works as long as the target table is blank. But whenever I refresh the Ads query with a new Date Range for example, there are duplicate entries in my consolidated table.

Is there any way to clear all data in the consolidated table? I’ve already created a button for the trigger, but the closest function I found was CLEAR(row) which won’t work in this case.

I’m open to API suggestions as well!


So a not-so-elegant solution I have so far is that I have a table called BLANK, and I’m just using OVERWRITE(BLANK!A:Z, TARGET!A1:Z1). It works, but it feels like I’m cheating lol. Are there any other alternatives?

Hi @bhargavaman

I think the solution you have made for =OVERWRITE(BLANK!A:Z, TARGET!A1:Z1) is probably the route I would have taken too and the best way that we currently have to do so.

1 Like