Set up the SAP® BDC Connect for Snowflake Zero-Copy connector

Note

The manage-zerocopy-sapbdc skill manages the end-to-end lifecycle of the SAP and Snowflake Zero-Copy Integration and connector — creating connectors, consuming data products from SAP® BDC, publishing Snowflake data to SAP® BDC, analyzing shared data, and troubleshooting issues, all through a conversational, step-by-step workflow. This skill is bundled with Cortex Code (CoCo), and you can use it to automate the steps in this topic.

Note

The Zero-Copy connector is subject to the SAP® BDC Connect for Snowflake Terms.

The steps to share Data Products from SAP® BDC to SAP® Snowflake accounts and existing Snowflake accounts that use the SAP® BDC Connect for Snowflake are exactly the same.

This topic describes how to create and manage a Zero-Copy connector for SAP® BDC Connect for Snowflake on the Snowflake side. For the SAP® side setup, see SAP® Snowflake or SAP® BDC Connect for Snowflake.

For the privileges required for each operation, see SAP® BDC Connect for Snowflake Zero-Copy connector: Security and privileges.

Prerequisites

Before creating a Zero-Copy connector:

  • Use a Snowflake account that isn’t a trial account. SAP® BDC Connect for Snowflake is not available for Snowflake trial accounts.

  • An ORGADMIN must accept the SAP® BDC Connect for Snowflake Terms. This only needs to be done once per Snowflake organization. To revoke the terms, contact Snowflake Support.

    To accept the SAP® BDC Connect for Snowflake Terms in Snowsight:

    1. Sign in to Snowflake as a user with the ORGADMIN role.
    2. In the navigation menu, select Admin » Terms.
    3. In the Snowflake Marketplace section, next to SAP® BDC Connect for Snowflake Terms, select Review.
    4. Select Acknowledge & Continue.

    CREATE ZEROCOPY CONNECTOR fails until the terms are accepted.

  • Complete the SAP® side setup described in SAP® Snowflake or SAP® BDC Connect for Snowflake.

  • The role used to create the connector must have CREATE ZEROCOPY CONNECTOR on the target schema. By default, the owner role of a schema has this privilege.

Create a database and schema

A Zero-Copy connector is a schema-level object. Before creating one, ensure you have a target database and schema, or create new ones. For reference, see CREATE DATABASE and CREATE SCHEMA.

CREATE DATABASE IF NOT EXISTS my_db;

CREATE SCHEMA IF NOT EXISTS my_db.my_schema;

Create a Zero-Copy connector

Create the connector with CREATE ZEROCOPY CONNECTOR. Use a fully qualified name (<db>.<schema>.<connector>):

CREATE ZEROCOPY CONNECTOR IF NOT EXISTS my_db.my_schema.my_sap_connector
  PARTNER = SAP_BDC;

After creation, the connector is in the NEW state. No connection is established until you connect it.

Enroll with SAP® BDC

Connect the connector with the invitation link from SAP® BDC by using ALTER ZEROCOPY CONNECTOR … CONNECT. The connector must be in the NEW, CONNECT_ERROR, or DISCONNECTED state. For the operations that each state allows, see Connector states.

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  CONNECT WITH CONFIG = (
    INVITATION_LINK = '<Invitation Link from SAP BDC>'
  );

The connector immediately enters the CONNECTING state while the connection is established in the background.

Copy the complete invitation link from SAP® BDC. Each invitation link can be used only once. If the link is expired or was already used, the connector goes to the CONNECT_ERROR state and the connection_error column shows the reason. Snowflake doesn’t retry a failed connection: get a new invitation link and run ALTER ZEROCOPY CONNECTOR ... CONNECT again. You don’t need to drop and re-create the connector.

If your SAP® Business Data Cloud tenant requires private connectivity, the connector connects over AWS PrivateLink. For the requirements and how to check the status, see SAP® BDC Connect for Snowflake Zero-Copy connector: Private connectivity.

Verify the connector state

To check the state of a connector, use DESCRIBE ZEROCOPY CONNECTOR. The connector is ready when the status column shows CONNECTED. For a description of all output columns, including the SAP® BDC keys in the config column, see DESCRIBE ZEROCOPY CONNECTOR.

DESC ZEROCOPY CONNECTOR my_db.my_schema.my_sap_connector;

To list the connectors that the current role can see, use SHOW ZEROCOPY CONNECTORS:

SHOW ZEROCOPY CONNECTORS IN SCHEMA my_db.my_schema;

Set properties

To set a comment or to enable share back, use ALTER ZEROCOPY CONNECTOR … SET. Share back lets you publish Snowflake data to SAP® BDC. For more information, see Publish Data from Snowflake to SAP® BDC Connect for Snowflake.

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  SET COMMENT = 'SAP BDC connector for sales data products';

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  SET SHARE_BACK = TRUE;

To remove the comment, use UNSET COMMENT. To turn off share back, set SHARE_BACK = FALSE:

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  UNSET COMMENT;

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  SET SHARE_BACK = FALSE;

Disconnect the connector

Before you disconnect a connector, drop all catalog-linked databases created from it and turn off share back. The connector must be in the CONNECTED or DISCONNECT_ERROR state.

ALTER ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector
  DISCONNECT;

The connector immediately enters the DISCONNECTING state while the connection is removed in the background. When the operation completes, the connector is in the DISCONNECTED state.

To connect a disconnected connector again, get a new invitation link from SAP® BDC and run ALTER ZEROCOPY CONNECTOR ... CONNECT with it.

Drop the connector

To drop a connector, use DROP ZEROCOPY CONNECTOR. The connector must be in the NEW, CONNECT_ERROR, DISCONNECT_ERROR, or DISCONNECTED state. Zero-Copy connectors don’t support UNDROP.

DROP ZEROCOPY CONNECTOR IF EXISTS my_db.my_schema.my_sap_connector;

Next steps

Once the connector is in the CONNECTED state, you can: