Categories:

System functions (System Information)

SYSTEM$ZEROCOPY_CONNECTOR_LIST_SHARES

Lists the data products that a Zero-Copy connector exposes, and shows which of them are already mounted as catalog-linked databases. The output is in JSON format.

Use the name of a returned data product as the SHARE_NAME value when you create a catalog-linked database from the connector with CREATE DATABASE … LINKED_ZEROCOPY_CONNECTOR.

Syntax

SYSTEM$ZEROCOPY_CONNECTOR_LIST_SHARES('<connector_name>')

Arguments

connector_name

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.

Returns

Returns a string that contains a JSON array, sorted by name. Each element describes one data product.

FieldDescription
nameName of the data product. For Salesforce connectors, this is the name of the data share. For Workday connectors, it’s the name of a Workday namespace.
statusMOUNTED if at least one catalog-linked database in your account is mounted from the data product, otherwise UNMOUNTED.
catalog_linked_databasesCatalog-linked databases mounted from the data product that your current role can see, each as an object with a name field.
id, display_name, comment, propertiesMetadata that SAP® BDC provides for the data product. Returned only for a SAP® BDC connector, and only when SAP® BDC supplies a value.

Usage notes

  • The connector must be connected. The function fails otherwise.
  • The function reads the list from the partner each time you call it. The display_name and comment of an SAP® BDC data product are the values that SAP® BDC returns.
  • A data product can be MOUNTED while catalog_linked_databases is empty if the database that mounts it is owned by a role that your current role can’t see.
  • For a Salesforce connector, a catalog-linked database created with ALL_SHARES = TRUE mounts every data share. For a Workday connector, every catalog-linked database mounts the whole catalog.

Access control requirements

A role used to execute this operation must have at least one privilege (USAGE, OPERATE, MODIFY, MONITOR, or OWNERSHIP) 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.

Examples

List the data products of a Salesforce connector:

SELECT SYSTEM$ZEROCOPY_CONNECTOR_LIST_SHARES('my_db.my_schema.my_sfdc_connector');
[
  {
    "name": "contact_v1",
    "status": "UNMOUNTED",
    "catalog_linked_databases": []
  },
  {
    "name": "opportunity_v1",
    "status": "MOUNTED",
    "catalog_linked_databases": [ { "name": "MARKETINGSHARE" } ]
  }
]

List the data products of a SAP® BDC connector:

SELECT SYSTEM$ZEROCOPY_CONNECTOR_LIST_SHARES('my_db.my_schema.my_sap_connector');
[
  {
    "name": "sap_sales_order",
    "id": "3f1c8a52-7b0e-4d51-9a4f-0c6d1e2b7a90",
    "display_name": "Sales Order",
    "status": "MOUNTED",
    "catalog_linked_databases": [ { "name": "MY_SALES_ORDER" } ]
  }
]