Multiple Delete Rows in BT

Hi Gliders!

I’m stuck with trouble how to delete multimultiple Rows in BT. It’s terrible to do it one by one with huge quantity of updates :scream:
Are there workarounds maybe?

My use case is storing bar-codes to a row, having ~500 rows a day. I need it for a couple weeks for history and reporting. Then i need to rollout this set into one row per day to pack \ compress rows for decreasing quantity of rows. Because do not need such detail history after a couple weeks. But both kind of rows (detailed and packed) i need for reporting & diagrams.

Use the API. You can delete rows in batches of up to 500 with a single API call.

2 Likes

@Darren_Murphy Thank you :pray:
Could you explain please or give a link to - how to do it with batches of row just by single API call?
Would it cost 500 updates if the batch is 500 rows?

The documentation shows you how to do it. Just create a separate mutation for each row to be deleted, and send them all in a single call as a collection.

Example:

{
  "appID": "APP-ID",
  "mutations": [
    {
      "kind": "delete-row",
      "tableName": "native-table-xxxxx",
      "rowID": "ROW-ID"
    },
    {
      "kind": "delete-row",
      "tableName": "native-table-xxxxx",
      "rowID": "ROW-ID"
    }
  ]
}

Each row deleted is one update, the same as it would be if you used a delete row action.

1 Like

Thank you very much, Darren! :pray:
Am going to do.
Regret about huge quantity of updates in this solution :scream:
instead of just one update in case of Delete row by Multi-Relation…

Deleting rows through a multi-relation still counts one update for each deleted row - so it’s the same either way.

1 Like

Oh, i did’nt know that, thank you :pray:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.