fix(ingest/mongodb): schema_metadata referenced before assignment (#10169)

This commit is contained in:
sid-acryl 2024-04-11 05:47:09 +05:30 committed by GitHub
parent f96abc1cc6
commit d546f65071
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -394,6 +394,8 @@ class MongoDBSource(StatefulIngestionSourceBase):
customProperties={},
)
schema_metadata: Optional[SchemaMetadata] = None
if self.config.enableSchemaInference:
assert self.config.maxDocumentSize is not None
collection_schema = construct_schema_pymongo(