May 25, 2020 05:58 PM
I have recently configured the Map block on a few tables with a total of couple of hundred rows between them.
A few days later I checked my Google Developers console to see how my geocoding API key was faring, and I was shocked to see ~18,000 requests for that key.
If I open a Map block and the associated table simultaneously, I can see the geocoding cache column get updated repeatedly as I interact with the map — even though no data in those rows is changing. The gif below shows cell updates being triggered just while viewing/panning/zooming the map…
Then, if I open up one of records in question, I can see a bunch of changelog entries of the form: “User X edited this record using Map block Y”…
Can anyone explain what’s going on here? I’d like to keep using the Map block, but not if it’s going to blow up my API quotas simply by viewing the maps :frowning:
Solved! Go to Solution.
May 26, 2020 08:03 PM
Wow, my first post and I’m grateful for all the suggestions and discussion. Thanks!
Also, since it is in the the nature of things to pipe up when you are having problems — just wanted to also say that I am new to Airtable and generally loving it, including the Maps Block. One of the nicer solutions I’ve seen to get a table of location data geocoded quickly. Just need to get this over-geocoding issue sorted :slightly_smiling_face:
A few points, some in response to questions raised above
First of all, I’m going to start by doing a one-off copy of my calculated field into a dumb text field per @Bill.French’s suggestion — and point the Map Block at that. Let’s see if that nips the updates in the bud.
Remember that part of the problem here is not just the excessive geocoding, but also that attempt to update the row as well with the new cached geocoding value, thus spamming the edit history of each record. You’ll note from the 2nd image in my original post that the new value is always the same as the old value, thus defeating the purpose of having it cached in the first place, seemingly.
The actual formula I was using — turns out there were a couple of these formula columns in different tables.
One was simply concatenating plain text fields and strings — CONCATENATE(Address, ", ", Neighborhood, ", Queens, NY")
where Neighborhood
is a Single Line Text field
One was concatenating a fields, string, and references — CONCATENATE({Address or Cross Streets},", ",{Neighborhood (STRUCTURED)})
where Neighborhood (STRUCTURED)
is a Link to Another Record field
I think the perverse behavior I observed was entirely in the latter table, but I’m not positive.
I’ll report back if I come up with any answers, and @Kasra I’ll follow up with support@ as well.
Thanks!
May 26, 2020 08:09 PM
Oh yea, that likely explains the behavior you’re seeing. Each map block stores the cached coordinates from the address field into the cache field. So if you have two maps with two different address fields, they’ll keep over-writing each others cache. In other words:
May 26, 2020 08:13 PM
Hi @Kasra, I only have one map block and I am seeing the exact same behavior. An extremely high number of API requests, just from adding one new record to a table.
May 26, 2020 08:16 PM
The best bet might be to email support@airtable.com so we can investigate more closely.
May 27, 2020 08:03 AM
A long time ago I thought I saw this and I wasn’t as thorough as @ScottWorld in sussing out the causal aspects. This was for a client and we needed to reverse geo-encode more than 25,000 locations. So I put a pin in that approach and went full API for mapping into Carto.
I resurrected that initial base and just verified, it is doing exactly what @ScottWorld is observing.
May 27, 2020 08:09 AM
I really hope that Airtable fixes this problem ASAP, because otherwise, this Maps Block will be of absolutely no use to my clients who have thousands of records in their system. Seems like it would only be useful for people with a small handful of records in their system.
May 27, 2020 08:15 AM
Yep - must be fixed - this is why we abandoned the idea of using Airtable maps for our project. This chart represents just 10 minutes of public transit locations reporting passenger flow. There aren’t many route stop locations, but there is a lot of activity and that’s when we noticed this overheating of the API calls.
May 29, 2020 08:53 AM
Original poster here again, with an update.
TLDR my problem appears to be solved. To summarize:
I tore down all existing Map Blocks in my project
I re-created, pointing the Map Blocks to purely static Single line text columns (created with a one-off copy&paste). That immediately nipped the problem in the bud, as expected:
I then resumed using Formula columns, being careful to ensure that no two Map Blocks were referencing the same cache column, but with different location columns. Ultimately in my case I think that was the root of the pathological geocoding I was seeing, as suggested above (and maybe that condition might make for a good warning message in the product? cc @Kasra).
API usage seems normal again. Note a small number of requests, corresponding to actually changed data:
I am cautiously saying that a Map based on a concatenated Formula column is now working as expected and will report back if that’s not true.
The only weird thing now, is that I unpredictably get this dialog once in a while in my Map Block. I worry that this is alarming/discouraging to my users and keeps them from using the maps. I can’t figure out the reason for this, no settings have changed in the meantime afaik:
May 29, 2020 09:06 AM
Not sure about that warning message! That’s strange.
That’s great to hear that your situation is temporarily working. Not sure if it’s going to stay permanently working, though. I say that because my system is setup 100% identically to yours, and I temporarily didn’t see any problems at first — and then all the same problems started happening to me shortly thereafter.
I reached out to support@airtable.com, and they said that they would investigate this issue.
If your solution breaks again, our only option for now will be to use external automations & websites to map our data. Kind of a bummer.