Skip to content

Commit 756a005

Browse files
tpellissierclaude
andcommitted
Use single upserts in example (UpsertMultiple has a known issue)
Single PATCH upsert works correctly. UpsertMultiple bulk action returns 'An unexpected error occurred' on custom tables - this is a pre-existing issue in the upsert implementation to investigate separately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 30a0626 commit 756a005

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

examples/advanced/alternate_keys_upsert.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,17 @@ def main():
146146
)
147147
print(" Upserted EXT-001 (single)")
148148

149-
print("\n4b. Upsert multiple records (UpsertMultiple bulk, creates new)...")
149+
print("\n4b. Upsert second record (single PATCH)...")
150150
client.records.upsert(
151151
TABLE_NAME,
152152
[
153153
UpsertItem(
154154
alternate_key={KEY_COLUMN.lower(): "EXT-002"},
155155
record={"new_productname": "Widget B", "new_price": 19.99},
156156
),
157-
UpsertItem(
158-
alternate_key={KEY_COLUMN.lower(): "EXT-003"},
159-
record={"new_productname": "Widget C", "new_price": 29.99},
160-
),
161157
],
162158
)
163-
print(" Upserted EXT-002, EXT-003 (bulk)")
159+
print(" Upserted EXT-002 (single)")
164160

165161
# ------------------------------------------------------------------
166162
# Step 5: Upsert again (updates existing via single PATCH)

0 commit comments

Comments
 (0)