Area: API Issues
Sub-Area: Data Product Patch Builder
Applies to: OSS + Cloud
Issue
When you use DataProductPatchBuilder to set a structured property on a Data Product, the emit fails. The error starts with this text, followed by a JSON error message from the server:
OperationalError: Unable to emit metadata to DataHub GMS: <server message>
You Might Be Asking
- Why does my DataProductPatchBuilder code fail when it sets a structured property?
- Will downgrading the SDK to 1.5.0.3 fix it?
- Do I need to change how I use the patch builder?
Cause
This is a known SDK issue with setting structured properties through DataProductPatchBuilder. It is fixed in acryl-datahub 1.6.0 and later. In current releases, set_structured_property sends a single JSON Patch add for the property. It is not a problem with your structured property configuration.
Solution
- Check your SDK version:
datahub version
- Upgrade to 1.6.0 or later. Don't downgrade to 1.5.0.3. In your virtual environment, run:
python3 -m pip install --upgrade acryl-datahub
-
If you use DataHub Cloud, use the CLI/SDK version in the "Recommended Versions" block of your release notes. The v2.4.4 release notes list 1.7.0.19. Cloud server versions (v2.x) are not SDK versions (1.x). If you are not sure which SDK version to use, contact DataHub Support.
-
If you use self-hosted DataHub, don't upgrade the CLI and SDK ahead of your server. The CLI docs say new CLIs are not tested against older servers.
-
Run your script again. Keep using DataProductPatchBuilder, imported from
datahub.specific.dataproduct, for the structured property change. A patch changes only that property. It does not replace the whole aspect. See Emitting Patch Updates to DataHub.