Upserting record
Save multiple records to Avalanchio table.
from avalanchio import schema
schema_service = schema.SchemaService()
table_name = 'employee'
record = {
"name": "test",
"salary": 123,
"id": "7949bccd-8ca4-43de-a8f0-69ba1f31d98e"
}
batch = [record]
res = schema_svc.upsert(table_name=table_name, batch=batch)
If you do not provide the "id" for each record, a random id will be automatically generated at the server side using java.util.UUID.
If record with the given id is present, the existing record is updated. The existing fields values are merged with the user supplied dict.
While loaded large number of records, you may like to disable auto-commit, which is set to True by default.