Summary
datahub.sdk.document.Document.create_document / create_external_document do not accept a dataPlatformInstance (platform instance) aspect. Connectors that need to set a platform instance on a Document currently fall back to the low-level doc._set_aspect(DataPlatformInstanceClass(...)) private API.
Current workaround
Both the Confluence and Quip document connectors do this:
doc._set_aspect(
DataPlatformInstanceClass(
platform=make_data_platform_urn(self.platform),
instance=make_dataplatform_instance_urn(self.platform, self._instance_id),
)
)
_set_aspect is a private method, so this is fragile and duplicated across connectors.
Proposed fix
Add first-class support for a platform instance to the Document SDK builders (e.g. a platform_instance / data_platform_instance parameter on create_document / create_external_document), then remove the _set_aspect workaround from the Confluence and Quip sources.
References
metadata-ingestion/src/datahub/ingestion/source/quip/quip_source.py (_set_platform_instance)
metadata-ingestion/src/datahub/ingestion/source/confluence/confluence_source.py
Summary
datahub.sdk.document.Document.create_document/create_external_documentdo not accept adataPlatformInstance(platform instance) aspect. Connectors that need to set a platform instance on a Document currently fall back to the low-leveldoc._set_aspect(DataPlatformInstanceClass(...))private API.Current workaround
Both the Confluence and Quip document connectors do this:
_set_aspectis a private method, so this is fragile and duplicated across connectors.Proposed fix
Add first-class support for a platform instance to the
DocumentSDK builders (e.g. aplatform_instance/data_platform_instanceparameter oncreate_document/create_external_document), then remove the_set_aspectworkaround from the Confluence and Quip sources.References
metadata-ingestion/src/datahub/ingestion/source/quip/quip_source.py(_set_platform_instance)metadata-ingestion/src/datahub/ingestion/source/confluence/confluence_source.py