Let me reproduce the error with a real case I got from a teammate:
# create the table
CREATE TABLE temp.bucket_locations
AS
SELECT 'ASIA-EAST1' bucket_location
UNION ALL SELECT 'ASIA-NORTHEAST2' bucket_location;
#update several times
UPDATE temp.bucket_locations
SET bucket_location = "US"
WHERE UPPER(bucket_location) LIKE "US%";
UPDATE temp.bucket_locations
SET bucket_location = "TW"
WHERE UPPER(bucket_location) LIKE "ASIA-EAST1%";
UPDATE temp.bucket_locations
SET bucket_location = "JP"
WHERE UPPER(bucket_location) LIKE "ASIA-NORTHEAST1%";
UPDATE temp.bucket_locations
SET bucket_location = "HK"
WHERE UPPER(bucket_location) LIKE "ASIA-EAST2%";
UPDATE temp.bucket_locations
SET bucket_location = "JP"
WHERE UPPER(bucket_location) LIKE "ASIA-NORTHEAST2%";
UPDATE temp.bucket_locations
SET bucket_location = "KR"
WHERE UPPER(bucket_location) LIKE "ASIA-NORTHEAST3%";
UPDATE temp.bucket_locations
SET bucket_location = "IN"
WHERE UPPER(bucket_location) LIKE "ASIA-SOUTH1%";
UPDATE temp.bucket_locations
SET bucket_location = "SG"
WHERE UPPER(bucket_location) LIKE "ASIA-SOUTHEAST1%";
UPDATE temp.bucket_locations
SET bucket_location = "AU"
WHERE UPPER(bucket_location) LIKE "AUSTRALIA%";
UPDATE temp.bucket_locations
SET bucket_location = "FI"
WHERE UPPER(bucket_location) LIKE "EUROPE-NORTH1%";
UPDATE temp.bucket_locations
SET bucket_location = "BE"
WHERE UPPER(bucket_location) LIKE "EUROPE-WEST1%";
UPDATE temp.bucket_locations
SET bucket_location = "GB"
WHERE UPPER(bucket_location) LIKE "EUROPE-WEST2%";
UPDATE temp.bucket_locations
SET bucket_location = "DE"
WHERE UPPER(bucket_location) LIKE "EUROPE-WEST3%";
UPDATE temp.bucket_locations
SET bucket_location = "NL"
WHERE UPPER(bucket_location) LIKE "EUROPE-WEST4%";
UPDATE temp.bucket_locations
SET bucket_location = "CH"
WHERE UPPER(bucket_location) LIKE "EUROPE-WEST6%";
UPDATE temp.bucket_locations
SET bucket_location = "CA"
WHERE UPPER(bucket_location) LIKE "NORTHAMERICA%";
UPDATE temp.bucket_locations
SET bucket_location = "BR"
WHERE UPPER(bucket_location) LIKE "SOUTHAMERICA%";
Exceeded rate limits: too many table update operations for this table
The solution for this case is avoiding doing so many updates. Instead, we can do only one, by combining all the mappings together:
CREATE TEMP TABLE `mappings`
AS
SELECT *
FROM UNNEST(
[STRUCT('US' AS abbr, 'US%' AS long), ('TW', 'ASIA-EAST1%'), ('JP', 'ASIA-NORTHEAST2%'
# add mappings
)]);
UPDATE temp.bucket_locations
SET bucket_location = abbr
FROM mappings
WHERE UPPER(bucket_location) LIKE long