SYSTEM$SAP_PUBLISH_DATA_PRODUCT
functionnot supportedCore SQL functionsPublishes the Iceberg tables in a Snowflake share to SAP® BDC as a data product.
Syntax
SYSTEM$SAP_PUBLISH_DATA_PRODUCT('<connector_name>', '<share_name>', '<description_json>', '<csn_json>')
Parameters
| Name | Required | Description |
|---|---|---|
connector_name | required | The name of the Zero-Copy connector. Specify it as a string literal enclosed in single quotes. You can use a fully qualified name (<db>.<schema>.<connector>) or a partially qualified name. |
share_name | required | The name of the share to publish, as a string literal. The share must already be added to the connector with ALTER ZEROCOPY CONNECTOR … ADD SHARE. |
description_json | required | A JSON object, as a string literal, that describes the data product. It must contain the following keys, each with a non-empty string value: title: the name of the data product. shortDescription: a one-line summary. description: a full description. Other keys are ignored. |
csn_json | required | A JSON object, as a string literal, that contains the SAP® Core Schema Notation (CSN) description of the tables you publish. You provide the CSN. Snowflake sends it to SAP® BDC without changing it. SAP® BDC validates its contents. |
Returns
Returns a string that confirms the request was accepted. SAP® BDC completes the publication afterwards, so check the data product in SAP® BDC for the final result.
Usage notes
- The function applies to SAP® BDC connectors. Before you call it, the connector must have share back enabled and the share must be added to the connector. For the requirements for the tables in the share, see Publish Data from Snowflake to SAP® BDC Connect for Snowflake.
- The function publishes every table in the share that the share has SELECT on, in a schema that the share has USAGE on.
- Calling the function again for the same share updates the data product.
- Unpublishing a data product isn’t supported. Removing a share from a published data product doesn’t unpublish it.
- To keep quotes in the JSON values from ending the string literal, pass description_json and csn_json as dollar-quoted string constants, as in the example.
- The function fails if the share isn’t added to the connector, the connector doesn’t have share back enabled, the share has no accessible Iceberg tables, description_json or csn_json is invalid, or SAP® BDC rejects the request.
Access control requirements
A role used to execute this operation must have the OPERATE privilege on the Zero-Copy connector. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.