Ports & Assets
Manage input ports, output ports, and assets for a data product
PUT
PUT /v1/dataProducts/{fqn}/assets/add
Ports & Assets
Manage the input ports, output ports, and associated assets of a data product. These endpoints allow you to add or remove data assets from a data product without replacing the entire entity. An asset can be either an input port or an output port of a data product, not both. If every asset in the request is rejected, the request returns400. If only some are rejected, it returns 200 (or 202 when every accepted asset is held for approval, as described under Returns) and lists each rejected asset with its reason in failedRequest. Ports must reference a data asset, so column-level entities such as tableColumn are rejected.
Add Assets
UsePUT /v1/dataProducts/{fqn}/assets/add to add assets to a data product.
Remove Assets
UsePUT /v1/dataProducts/{fqn}/assets/remove to remove assets from a data product.
PUT /v1/dataProducts/{fqn}/assets/add
Returns
Returns a bulk operation result.status is success when no asset was rejected, partialSuccess when some were rejected, and failure when every asset was rejected. The numberOfRowsProcessed, numberOfRowsPassed, and numberOfRowsFailed fields hold the counts. From Collate 2.1.0, the result also has numberOfRowsPendingApproval; earlier releases omit it. successRequest lists each accepted asset reference, and failedRequest lists each rejected asset reference with the reason in message.
A dry run (dryRun: true) of the add or remove assets endpoints reports the result without changing any asset. The input and output port endpoints don’t support dry runs.
From Collate 2.1.1, a bulk add or remove of input or output ports runs in one transaction. If the request fails partway, Collate saves none of the batch.
From Collate 2.1.0, an approval workflow can hold assets for approval. Each held asset is listed in successRequest and counted in numberOfRowsPendingApproval, and the X-OpenMetadata-Pending-Change-Count response header carries the same count. If assets are held and none is applied, the request returns 202 instead of 200. A dry run holds nothing and submits no change requests.