I quite often use Airtable as both a database front-end and back-end.
The front-end is really easy to set up, works as I expect it, and it’s super easy to have other people interact with it with very little training. Permissions systems are built in (and one less thing for me to look after).
One negative is that it’s quite easy to break the database if you click the wrong thing. This is less of a problem if it’s just humans using it, but as soon as you start integrating something into it that’s looking for a particular column name, things can easily be broken if someone starts changing things. I usually have redundant, hidden, formula columns for this purpose. The formula is just “display what’s in that column over there”, but by being hidden, and having computer-friendlier names
from_host rather than From Host, for example, people tend not to break them. Then if someone does decide to change From Host to Old Host, Airtable handle that well internally.
As a back-end it’s helpful too. Sure, if I’m building something only I have to interact with, it’ll probably be powered with a regular database, because it doesn’t have to be user-friendly, just computer-friendly (and “person who speaks computer” friendly). Typically though, the sort of systems people want to actually pay me for — even if they’re only temporary — want some sort of control panel that has a non-programmer looking after.
This is where Airtable shines. Especially if the control panel is going to be used for only a couple of weeks, it makes sense to throw something together in Airtable, and use one of the brilliant API connectors (I like this one for Python) to get data and feed it back in.
This usually works really well, until you hit a limitation you didn’t know about. This happened to me today. Basically my system was getting records from Airtable, doing something, then logging data back to an Airtable long text field. Then suddenly the whole system stopped. One look at the errors showed it was something to do with Airtable — everything else seemed to be working okay.
It turns out that the long text field has an undocumented limit of 100,000 characters (which to be fair is quite long). The logs being generated from this system, however, were being appended to the previous run’s logs. In some cases it was running once every 30 seconds or so. That adds up surprisingly quickly.
I fixed that with a few characters:
new_log = str(new_log + log_notes)
new_log = str(new_log + log_notes)[-80000:]
Which should stop it from getting anywhere near the actual limit. Even if it means truncating the old logs. In this case, the older ones don’t matter much anyway, so that’s not a problem.
Originally published on blog.jwdt.co.uk.