replace_schema
Replace the schema wholesale — and read the count of live rows it destroyed.
replace_schema(schema_document: str, force_drop_existing: bool) -> SchemaReplacereplace_schema(request: SchemaReplaceRequest) -> SchemaReplaceResponseParameters
ParameterTypeRequired
schema_documentstringrequiredThe replacement.
force_drop_existingbooleanrequiredRequired, not optional — you must state whether rows that no longer fit may be dropped. false makes the call fail rather than destroy data.
Returns
FieldTypePresence
namespace / schema_version—alwaysWhere it landed.
dropped_countintegeralwaysThe number of live rows this replacement destroyed. Read it.
validation_errorsSchemaError[]alwaysEmpty on success.
Validation failures are not exceptions
This verb resolves with a populated validationErrors array rather than
throwing. Code that only wraps the call in a try/catch treats an invalid
schema as a successful one. Check the array.
See also
Was this page helpful?