Is it possible to delete a record from a Databin? What is the syntax?
There isn’t a function for this.
Databins seem like an “append-to only” datastructure for representing a series of values. You wouldn’t use databins, for example, to represent an arbitrary spreadsheet. For that I would I CloudDeploy a table of values to the cloud.
You could implement a function to delete a record from a databin, but it would require basically copying a databin and creating a new one.
As this is the first result that appears when I Google “how do you delete an entry from a Databin”, I thought I would add that in Version 10.2 a DatabinRemove function was added to help with this.
I was just looking for something to remove items from a Databin:
This is from the documentation:
“As of Version 12.2, DatabinRemove is no longer supported.”
I wonder why?
Yes, DatabinRemove was itself removed (Actually it still works, we just don’t guarantee that it will in the future).
The original model for the datastructure was append-only and they decided that it was a mistake to deviate from it. The reason for it being append-only is going to be a long, complicated conversation about distributed algorithms and datastructures, but I’m sure being append only has some important performance characteristic.
For future reference, DatabinRemove[] still works as of Version 13.2, but it is officially deprecated as it defeats the purpose of Databins. If you’re looking for a recordset that you can update/delete items from you’re better off using a database like SQL Server, MySQL, Mongodb, Couchdb, &c., as Data Drop is really intended for data capture (there’s a difference).
If you need to update a record, you have to delete and then replace.