ALTER ZEROCOPY CONNECTOR¶
Modifies the properties of an existing Zero-Copy connector. You can use this command to do the following:
- Connect the connector to your SAP BDC or Workday tenant, or disconnect it.
- Set or unset the comment of the connector.
- Enable or turn off share back, and associate shares with the connector, for SAP BDC connectors.
- Rename the connector.
Syntax¶
Parameters¶
nameSpecifies the identifier for the connector to alter.
If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
For more information, see Identifier requirements.
RENAME TO new_nameChanges the name of the connector to
new_name. The new identifier must be unique for the schema.For more information, see Identifier requirements.
CONNECT WITH CONFIG = ( config_key = 'value' [ , ... ] )Connects an SAP BDC or Workday connector to the partner by using the specified configuration. All keys for the partner are required. For the keys, see Configuration keys for CONNECT.
The connection completes in the background. For more information, see Connect and disconnect usage notes.
DISCONNECTDisconnects the connector from the partner. The operation completes in the background. For the prerequisites, see Connect and disconnect usage notes.
SET ...Specifies one or more properties to set for the connector, separated by blank spaces, commas, or new lines:
COMMENT = 'string_literal'Adds a comment or overwrites an existing comment for the connector.
SHARE_BACK = { TRUE | FALSE }SAP BDC only. Specifies whether share back is enabled for the connector. With share back, you publish Snowflake data as data products to SAP BDC. For more information, see Publish Data from Snowflake to SAP® BDC Connect for Snowflake.
TRUE: Enables share back. The connector must be in theCONNECTEDstate.FALSE: Turns off share back and removes all shares that are associated with the connector. This doesn’t unpublish data products that you already published. Unpublishing a data product isn’t supported.
Default:
FALSE
UNSET COMMENTRemoves the comment from the connector.
ADD SHARE share_nameAssociates a share with an SAP BDC connector so that you can publish the objects of the share to SAP BDC. Share back must be enabled for the connector. For the requirements for the share, see Share back usage notes.
REMOVE SHARE share_nameRemoves the association between the share and the connector.
Configuration keys for CONNECT¶
The keys depend on the partner of the connector.
SAP BDC¶
| Key | Description |
|---|---|
INVITATION_LINK | The invitation link that you copy from SAP for Me. Each link can be used only once. |
Workday¶
| Key | Description |
|---|---|
TENANT | Your Workday tenant name. |
DOMAIN | The Workday services host, for example impl-services1.wd12.myworkday.com. |
CATALOG_ENDPOINT | The Workday Data Cloud catalog host, for example impl-catalog.wd12.myworkday.com. |
CLIENT_ID | The identifier of the API client that your Workday administrator registered. |
CLIENT_SECRET | The secret of the API client. |
REFRESH_TOKEN | The refresh token that was issued for the API client. |
For DOMAIN and CATALOG_ENDPOINT, specify a host name or an https:// URL without a path.
Snowflake stores CLIENT_SECRET and REFRESH_TOKEN encrypted, masks them in the recorded query text, and never displays them.
Specifying them as bind variables isn’t supported. If the client secret or the refresh token expires or is revoked,
queries on the connector’s catalog-linked databases fail.
Salesforce¶
You don’t connect a Salesforce connector with this command. Instead, you read the connector’s enrollment code with the
SYSTEM$GET_ZEROCOPY_CONNECTOR_CONFIG function and give it to your Salesforce administrator, who completes the connection from Salesforce Data Cloud.
See Set up the Salesforce Data Cloud Zerocopy Connector.
Connect and disconnect usage notes¶
CONNECTandDISCONNECTreturn before the operation completes. To check the result, run DESCRIBE ZEROCOPY CONNECTOR until thestatuscolumn is no longerCONNECTINGorDISCONNECTING. If the operation fails, theconnection_errorcolumn contains the reason.- If a
CONNECTstatement for SAP BDC or Workday fails, the connector moves toCONNECT_ERROR. Snowflake doesn’t retry it. Correct the cause, for example get a new invitation link from SAP for Me, and run the statement again. You don’t have to drop and re-create the connector. - If a Salesforce connection that your administrator started can’t be completed right away, Snowflake retries it for a while.
If the connector still ends in
CONNECT_ERROR, repeat the enrollment from Salesforce Data Cloud. Check thestatuscolumn in Snowflake to confirm the connection. - Before you run
DISCONNECT, drop all catalog-linked databases that were created from the connector. If share back is enabled, setSHARE_BACK = FALSEfirst. - If the SAP BDC tenant that a connector is connected to is no longer available, drop the connector’s catalog-linked databases, run
DISCONNECT, and then connect the connector again with an invitation link for an active tenant.
Connector states¶
The following table shows the operations that each state allows.
| State | Allowed operations |
|---|---|
NEW | CONNECT, DROP, CREATE OR REPLACE |
CONNECTING | None, until the operation completes |
CONNECTED | DISCONNECT, and creating catalog-linked databases |
CONNECT_ERROR | CONNECT, DROP, CREATE OR REPLACE |
DISCONNECTING | None, until the operation completes |
DISCONNECTED | CONNECT, DROP, CREATE OR REPLACE |
DISCONNECT_ERROR | DISCONNECT, DROP, CREATE OR REPLACE |
Share back usage notes¶
Share back applies only to SAP BDC connectors. For the end-to-end procedure, see Publish Data from Snowflake to SAP® BDC Connect for Snowflake.
- A share that you add with
ADD SHAREmust meet the following requirements:- It has no consumer accounts and isn’t attached to a listing.
- It contains only databases, schemas, Iceberg tables, and dynamic Iceberg tables, granted with USAGE (databases and schemas) or SELECT (tables).
- It doesn’t use
WITH GRANT OPTION, future grants, or grants on all objects in a schema or database.
- A connector can have up to 1000 associated shares, and a share can be associated with up to 200 connectors.
- Dropping a share that is associated with a connector isn’t supported. Run
REMOVE SHAREfirst. - To view the associated shares, use DESCRIBE ZEROCOPY CONNECTOR.
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
| Operation | Privilege | Object |
|---|---|---|
CONNECT, DISCONNECT | OPERATE | The connector. |
SET, UNSET | MODIFY | The connector. |
ADD SHARE, REMOVE SHARE | USAGE | The connector. You must also have the OWNERSHIP privilege on the share. |
RENAME TO | OWNERSHIP | The 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.
Usage notes¶
- If you specify
IF EXISTSand the connector doesn’t exist, the statement completes successfully without making a change.
Examples¶
Connect an SAP BDC connector with the invitation link from SAP for Me:
Connect a Workday connector. Replace each placeholder with the value that your Workday administrator supplies:
Check the state of the connector:
Read the enrollment code of a Salesforce connector, and then give it to your Salesforce administrator:
Set and remove a comment:
Disconnect a connector after you drop its catalog-linked databases:
Enable share back on an SAP BDC connector, associate a share, and later remove the association:
Rename a connector: