Skip to content

Commit f5ab97a

Browse files
committed
Refresh manage-zerocopy-sapbdc with v1.1.1 audit pass
Re-staged with v1.1.1 holistic prompt that adds stopping-point markers, correct INSTRUCTIONS.md sub-flow cross-refs, and drops invalid tool snowflake_object_search.
1 parent 49dd772 commit f5ab97a

2 files changed

Lines changed: 76 additions & 82 deletions

File tree

skills/manage-zerocopy-sapbdc/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,13 @@ Before using this skill, ensure:
5959

6060
### Step 1: Download the Skill
6161

62-
The skill lives in the Snowflake-Solutions internal repository. Clone the whole repo and locate the skill folder:
62+
Clone the public Snowflake-Labs repository and locate the skill folder:
6363

6464
```
65-
git clone git@github.com:Snowflake-Solutions/cortex-code-skills.git
65+
git clone git@github.com:Snowflake-Labs/cortex-code-skills.git
6666
cd cortex-code-skills/skills/manage-zerocopy-sapbdc
6767
```
6868

69-
For external (Snowflake-Labs) distribution, the skill will be published separately at `https://github.com/Snowflake-Labs/cortex-code-skills` (forthcoming).
70-
7169
### Step 2: Install
7270

7371
#### Cortex Code (CLI)
Lines changed: 74 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
22
name: manage-zerocopy-sapbdc
33
title: SAP BDC Zero-Copy Connector
4-
summary: Manage the lifecycle of the SAP BDC zero-copy connector: create, enroll, consume, publish, analyze, and troubleshoot.
4+
summary: "Manage the lifecycle of the SAP BDC zero-copy connector: create, enroll, consume, publish, analyze, and troubleshoot."
55
description: >-
6-
Manage the end-to-end lifecycle of the Snowflake and SAP BDC Zero-Copy
7-
Integration and connector. Use when: consuming SAP data products in Snowflake,
8-
publishing Snowflake databases to SAP BDC, analyzing shared SAP data, or
9-
troubleshooting SAP BDC connector issues. Triggers: SAP BDC, SAP connector,
10-
zerocopy connector, SAP data product, SAP BDC Connect, SAP publish, SAP share,
11-
SAP troubleshoot, catalog-linked database, LINKED_ZEROCOPY_CONNECTOR, SAP BDC
6+
Use when consuming SAP BDC data products in Snowflake, publishing Snowflake
7+
databases back to SAP BDC, analyzing shared SAP data, or troubleshooting SAP
8+
BDC connector issues. Covers the end-to-end lifecycle of the Snowflake and
9+
SAP BDC zero-copy integration. Triggers: SAP BDC, SAP connector, zerocopy
10+
connector, SAP data product, SAP BDC Connect, SAP publish, SAP share, SAP
11+
troubleshoot, catalog-linked database, LINKED_ZEROCOPY_CONNECTOR, SAP BDC
1212
share back.
1313
tools:
1414
- snowflake_sql_execute
15-
- snowflake_object_search
1615
- Bash
1716
- Read
1817
- Write
@@ -22,116 +21,113 @@ tools:
2221
prompt: "$manage-zerocopy-sapbdc create a new zero-copy connector and enroll it with SAP BDC"
2322
language: en
2423
status: Published
25-
author: Sanjay Nagamangalam
24+
author: Snowflake Solutions Team
2625
type: snowflake
2726
demo-url: ""
2827
---
2928

3029
# SAP BDC <=> Snowflake Zero-Copy Integration
3130

32-
Manages the full lifecycle of the SAP BDC <=> Snowflake zero-copy integration and connector: setup, consume, publish, analyze, and troubleshoot.
31+
## Overview
3332

34-
## When to Use
33+
This skill manages the full lifecycle of the SAP BDC <=> Snowflake zero-copy connector: create, enroll, consume shared SAP data products, publish Snowflake data back to SAP BDC, analyze mounted data, and troubleshoot connector states. Use it when working with `ZEROCOPY CONNECTOR` objects whose `PARTNER = SAP_BDC`.
3534

36-
- User asks to create, connect, or enroll an SAP BDC zero-copy connector
37-
- User wants to consume or mount SAP BDC shared data products in Snowflake
38-
- User wants to publish Snowflake data back to SAP BDC as a data product
39-
- User asks to explore, query, or join data from mounted SAP data products
40-
- User needs to troubleshoot SAP BDC connector states, privileges, or connectivity
41-
- Do NOT use for: general Snowflake data sharing (non-SAP), SAP HANA direct connections, or SAP BTP non-BDC services
35+
Do NOT use this skill for general Snowflake data sharing (non-SAP), SAP HANA direct connections, or SAP BTP non-BDC services.
4236

4337
## Prerequisites
4438

45-
- An ORGADMIN must have accepted the SAP® BDC Connect for Snowflake Terms (Admin » Terms » Snowflake Marketplace section in Snowsight). This only needs to be done once per Snowflake organization.
46-
- SAP Business Data Cloud (BDC) setup must be complete
47-
- Role must have `CREATE ZEROCOPY CONNECTOR` on the target schema
48-
- For publishing: `CREATE SHARE` privilege on the account
39+
- An ORGADMIN has accepted the SAP® BDC Connect for Snowflake Terms (Admin » Terms » Snowflake Marketplace in Snowsight). One-time per Snowflake organization.
40+
- SAP Business Data Cloud (BDC) tenant is set up.
41+
- Your role has `CREATE ZEROCOPY CONNECTOR` on the target schema.
42+
- For publishing: `CREATE SHARE` on the account.
4943

5044
## Workflow
5145

52-
### Step 1: Ask User Intent
46+
### Step 1: Ask user intent
5347

54-
**Every time this skill is invoked**, present this menu:
48+
Always present this menu when the skill is invoked:
5549

5650
```
5751
What would you like to do with the SAP BDC <=> Snowflake zero-copy connector?
5852
59-
1. Create a new zero-copy connector - Set up a new connector and enroll it with SAP BDC
60-
2. Consume shared data products - Mount shared SAP BDC data products as catalog-linked databases in Snowflake
61-
3. Publish a data product - Share a Snowflake database back to SAP BDC as a new data product
62-
4. Analyze shared data - Explore, query, and join data from SAP BDC data products already mounted in Snowflake
63-
5. Troubleshoot - Diagnose and fix connector state errors, privilege issues, and connectivity problems
53+
1. Create a new zero-copy connector
54+
2. Consume shared SAP BDC data products
55+
3. Publish a Snowflake data product back to SAP BDC
56+
4. Analyze shared data already mounted in Snowflake
57+
5. Troubleshoot connector state, privileges, or connectivity
6458
```
6559

66-
**Route based on selection:**
67-
- Option 1 -> **Load** `create-connector/INSTRUCTIONS.md`
68-
- Option 2 -> **Load** `consume/INSTRUCTIONS.md`
69-
- Option 3 -> **Load** `publish/INSTRUCTIONS.md`
70-
- Option 4 -> **Load** `analyze/INSTRUCTIONS.md`
71-
- Option 5 -> **Load** `troubleshoot/INSTRUCTIONS.md`
72-
73-
## Connector Quick Reference
74-
75-
### Connector States
76-
| State | Description | Allowed Actions |
77-
|-------|-------------|-----------------|
78-
| NEW | Just created, no connection attempted | CONNECT, DROP |
79-
| CONNECTING | Connection in progress (async) | Wait |
80-
| CONNECTED | Active connection | DISCONNECT (must disable share-back and drop CLDs first), create CLDs, publish |
81-
| CONNECT_ERROR | Connection failed | CONNECT (retry), DROP |
82-
| DISCONNECTING | Disconnection in progress (async) | Wait |
83-
| DISCONNECTED | Connection dropped | CONNECT (reconnect), DROP |
84-
| DISCONNECT_ERROR | Disconnection failed | DISCONNECT (retry), DROP |
85-
| DELETED | Connector has been dropped (permanent, no UNDROP) | None |
86-
87-
### Key SQL Commands
60+
Route based on selection:
61+
- Option 1 → load `<SKILL_DIR>/create-connector/INSTRUCTIONS.md`
62+
- Option 2 → load `<SKILL_DIR>/consume/INSTRUCTIONS.md`
63+
- Option 3 → load `<SKILL_DIR>/publish/INSTRUCTIONS.md`
64+
- Option 4 → load `<SKILL_DIR>/analyze/INSTRUCTIONS.md`
65+
- Option 5 → load `<SKILL_DIR>/troubleshoot/INSTRUCTIONS.md`
66+
67+
⚠️ STOPPING POINT: Wait for the user's selection before loading any sub-flow.
68+
69+
## Sub-flows
70+
71+
- `<SKILL_DIR>/create-connector/INSTRUCTIONS.md` — create and enroll a new connector
72+
- `<SKILL_DIR>/consume/INSTRUCTIONS.md` — mount SAP data products as catalog-linked databases
73+
- `<SKILL_DIR>/publish/INSTRUCTIONS.md` — publish Snowflake data back to SAP BDC
74+
- `<SKILL_DIR>/analyze/INSTRUCTIONS.md` — query and join mounted SAP data
75+
- `<SKILL_DIR>/troubleshoot/INSTRUCTIONS.md` — diagnose connector errors
76+
77+
## Connector States
78+
79+
| State | Allowed Actions |
80+
|-------|-----------------|
81+
| NEW | CONNECT, DROP |
82+
| CONNECTING | wait |
83+
| CONNECTED | DISCONNECT (after disabling share-back and dropping CLDs), create CLDs, publish |
84+
| CONNECT_ERROR | CONNECT (retry), DROP |
85+
| DISCONNECTING | wait |
86+
| DISCONNECTED | CONNECT (reconnect), DROP |
87+
| DISCONNECT_ERROR | DISCONNECT (retry), DROP |
88+
| DELETED | none (no UNDROP) |
89+
90+
## Key SQL Commands
91+
8892
| Command | Purpose |
8993
|---------|---------|
9094
| `CREATE ZEROCOPY CONNECTOR <name> PARTNER = SAP_BDC` | Create connector |
9195
| `SELECT CURRENT_ORGANIZATION_NAME() \|\| '-' \|\| CURRENT_ACCOUNT_NAME()` | Derive account URL for SAP for Me registration |
9296
| `ALTER ZEROCOPY CONNECTOR <name> CONNECT WITH CONFIG = (INVITATION_LINK = '...')` | Establish connection |
9397
| `DESC ZEROCOPY CONNECTOR <name>` | Check connector state |
94-
| `SHOW ZEROCOPY CONNECTORS IN SCHEMA <db>.<schema>` | List all connectors |
98+
| `SHOW ZEROCOPY CONNECTORS IN SCHEMA <db>.<schema>` | List connectors |
9599
| `SELECT SYSTEM$ZEROCOPY_CONNECTOR_LIST_SHARES('<connector>')` | List available SAP data products |
96100
| `ALTER ZEROCOPY CONNECTOR <name> SET SHARE_BACK = TRUE` | Enable publishing |
97101
| `ALTER ZEROCOPY CONNECTOR <name> ADD SHARE <share>` | Associate share for publishing |
98-
| `ALTER ZEROCOPY CONNECTOR <name> DISCONNECT` | Disconnect (disable share-back and drop CLDs first) |
99-
| `DROP ZEROCOPY CONNECTOR <name>` | Drop connector (must be NEW/CONNECT_ERROR/DISCONNECT_ERROR/DISCONNECTED) |
102+
| `ALTER ZEROCOPY CONNECTOR <name> DISCONNECT` | Disconnect |
103+
| `DROP ZEROCOPY CONNECTOR <name>` | Drop (only when NEW / CONNECT_ERROR / DISCONNECT_ERROR / DISCONNECTED) |
104+
105+
## Required Privileges
100106

101-
### Required Privileges
102107
| Privilege | Scope | Purpose |
103108
|-----------|-------|---------|
104109
| CREATE ZEROCOPY CONNECTOR | Schema | Create connector |
105-
| OPERATE | Connector | Connect, disconnect, and publish data product (SYSTEM$SAP_PUBLISH_DATA_PRODUCT) |
106-
| USAGE | Connector | Create CLD (also requires CREATE DATABASE on account), add/remove share (also requires OWNERSHIP on share) |
107-
| MODIFY | Connector | Set/unset properties (comment, share_back, etc.) |
108-
| MONITOR | Connector | Describe connector, show connectors, list shares (any privilege on the connector is sufficient) |
109-
| OWNERSHIP | Connector | Rename or drop the connector |
110-
| CREATE DATABASE | Account | Create catalog-linked database (also requires USAGE on connector) |
110+
| OPERATE | Connector | Connect, disconnect, publish (SYSTEM$SAP_PUBLISH_DATA_PRODUCT) |
111+
| USAGE | Connector | Create CLD, add/remove share |
112+
| MODIFY | Connector | Set properties (share_back, comment) |
113+
| MONITOR | Connector | Describe / show / list shares |
114+
| OWNERSHIP | Connector | Rename or drop |
115+
| CREATE DATABASE | Account | Create catalog-linked database |
111116
| CREATE SHARE | Account | Publish data back to SAP BDC |
112117

113-
## Examples
114-
115-
### Example 1: Create and enroll a connector
116-
User: `$manage-zerocopy-sapbdc create a new zero-copy connector and enroll it with SAP BDC`
117-
Assistant: Asks for database/schema/connector name, runs CREATE ZEROCOPY CONNECTOR, provides Partner ID for SAP 4 Me registration, then connects with invitation link.
118-
119-
### Example 2: Consume a data product
120-
User: `$manage-zerocopy-sapbdc mount the Workforce Persons data product from SAP`
121-
Assistant: Lists available shares, creates a catalog-linked database, confirms tables are accessible and semantic views are generated.
122-
123-
### Example 3: Publish Snowflake data to SAP
124-
User: `$manage-zerocopy-sapbdc publish my ANALYTICS_DB.SALES schema to SAP BDC`
125-
Assistant: Enables share-back, creates Iceberg tables, generates CSN Interop JSON, creates share, publishes data product.
118+
## Common Mistakes
126119

127-
### Example 4: Troubleshoot
128-
User: `$manage-zerocopy-sapbdc my connector is stuck in CONNECT_ERROR`
129-
Assistant: Runs DESC ZEROCOPY CONNECTOR, checks privileges, validates invitation link, provides remediation steps.
120+
- Trying to `DISCONNECT` while CLDs still exist or share-back is enabled. Drop CLDs and `SET SHARE_BACK = FALSE` first.
121+
- Calling `DROP ZEROCOPY CONNECTOR` while CONNECTED. Disconnect first; only NEW, CONNECT_ERROR, DISCONNECT_ERROR, or DISCONNECTED states allow DROP.
122+
- Skipping the one-time ORGADMIN acceptance of the SAP BDC Connect terms. The connector will fail to connect.
123+
- Using a stale or already-consumed `INVITATION_LINK`. Each link is single-use; regenerate from SAP for Me.
124+
- Granting only `MONITOR` and expecting to create a CLD. CLD creation needs `USAGE` on the connector and `CREATE DATABASE` on the account.
130125

131126
## Stopping Points
132127

133-
- After Step 1: Route to selected sub-skill
128+
- Step 1 — wait for the user to choose an option (1–5) before loading any sub-flow.
129+
- Sub-flows contain their own stopping points before destructive actions (`DISCONNECT`, `DROP`, `ADD SHARE`, publishing data products). Do not run those commands without explicit user confirmation.
134130

135131
## Output
136132

137-
Depends on selected use case — see sub-skill outputs.
133+
Depends on the selected sub-flow — see each `INSTRUCTIONS.md` for outputs.

0 commit comments

Comments
 (0)