mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-05 23:41:31 +08:00
modify the skills name from - datacloud_code_extension → developing-datacloud-code-extension and datacloud_schema → getting-datacloud-schema
This commit is contained in:
parent
1678c16d24
commit
1d4f1dfd00
@ -1,4 +1,4 @@
|
|||||||
# datacloud_code_extension Skill
|
# developing-datacloud-code-extension Skill
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ A Claude Code skill that provides complete workflow for developing, testing, and
|
|||||||
|
|
||||||
The skill is now installed at:
|
The skill is now installed at:
|
||||||
```
|
```
|
||||||
/home/codebuilder/dx-project/.a4drules/skills/datacloud_code_extension/
|
/home/codebuilder/dx-project/.a4drules/skills/developing-datacloud-code-extension/
|
||||||
```
|
```
|
||||||
|
|
||||||
## What It Does
|
## What It Does
|
||||||
@ -337,7 +337,7 @@ Read data, check quality rules, write valid records and flag errors.
|
|||||||
## Files Created
|
## Files Created
|
||||||
|
|
||||||
```
|
```
|
||||||
datacloud_code_extension/
|
developing-datacloud-code-extension/
|
||||||
├── SKILL.md # Complete skill documentation
|
├── SKILL.md # Complete skill documentation
|
||||||
├── README.md # This file
|
├── README.md # This file
|
||||||
└── quick-reference.md # Command cheat sheet
|
└── quick-reference.md # Command cheat sheet
|
||||||
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: datacloud_code_extension
|
name: developing-datacloud-code-extension
|
||||||
description: Develop and deploy Data Cloud Code Extensions using SF CLI plugin. Use this skill when creating custom Python transformations for Data Cloud, deploying code extensions, or testing data transformations. Supports init, run, scan, and deploy operations.
|
description: Develop and deploy Data Cloud Code Extensions using SF CLI plugin. Use this skill when creating custom Python transformations for Data Cloud, deploying code extensions, or testing data transformations. Supports init, run, scan, and deploy operations.
|
||||||
---
|
---
|
||||||
|
|
||||||
# datacloud_code_extension Skill
|
# developing-datacloud-code-extension Skill
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -227,18 +227,18 @@ Look for DLOs in the `permissions` section:
|
|||||||
|
|
||||||
#### Step 4b: Validate Each DLO Schema
|
#### Step 4b: Validate Each DLO Schema
|
||||||
|
|
||||||
**Use the `datacloud_schema` skill to verify DLOs exist and check field names.**
|
**Use the `getting-datacloud-schema` skill to verify DLOs exist and check field names.**
|
||||||
|
|
||||||
For each DLO referenced in your code:
|
For each DLO referenced in your code:
|
||||||
|
|
||||||
1. **Verify DLO exists:**
|
1. **Verify DLO exists:**
|
||||||
```
|
```
|
||||||
Ask Claude: "Use datacloud_schema skill to check if Employee__dll exists in afvibe"
|
Ask Claude: "Use getting-datacloud-schema skill to check if Employee__dll exists in afvibe"
|
||||||
```
|
```
|
||||||
|
|
||||||
Or manually:
|
Or manually:
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Verify field names match:**
|
2. **Verify field names match:**
|
||||||
@ -275,7 +275,7 @@ Before proceeding to run, ensure:
|
|||||||
|
|
||||||
| Issue | Check | Fix |
|
| Issue | Check | Fix |
|
||||||
|-------|-------|-----|
|
|-------|-------|-----|
|
||||||
| DLO doesn't exist | Use datacloud_schema skill | Create DLO first or update code |
|
| DLO doesn't exist | Use getting-datacloud-schema skill | Create DLO first or update code |
|
||||||
| Field name typo | Compare code vs. schema | Fix field name in entrypoint.py |
|
| Field name typo | Compare code vs. schema | Fix field name in entrypoint.py |
|
||||||
| Wrong data type | Check schema data type | Update transformation logic |
|
| Wrong data type | Check schema data type | Update transformation logic |
|
||||||
| Missing permissions | Check config.json | Re-run scan |
|
| Missing permissions | Check config.json | Re-run scan |
|
||||||
@ -287,13 +287,13 @@ Before proceeding to run, ensure:
|
|||||||
cat payload/config.json
|
cat payload/config.json
|
||||||
|
|
||||||
# 2. Validate source DLO exists and get schema
|
# 2. Validate source DLO exists and get schema
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
||||||
|
|
||||||
# 3. Verify field 'position' exists in schema output
|
# 3. Verify field 'position' exists in schema output
|
||||||
# Look for: name: position__c (or position)
|
# Look for: name: position__c (or position)
|
||||||
|
|
||||||
# 4. Check target DLO exists
|
# 4. Check target DLO exists
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
||||||
|
|
||||||
# 5. If all checks pass, proceed to run
|
# 5. If all checks pass, proceed to run
|
||||||
```
|
```
|
||||||
@ -424,9 +424,9 @@ sf data-code-extension script scan --entrypoint ./payload/entrypoint.py
|
|||||||
# Check config.json for DLOs used
|
# Check config.json for DLOs used
|
||||||
cat payload/config.json
|
cat payload/config.json
|
||||||
# Validate Employee__dll exists and has 'position' field
|
# Validate Employee__dll exists and has 'position' field
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
||||||
# Validate Employee_Upper__dll exists (target DLO)
|
# Validate Employee_Upper__dll exists (target DLO)
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
||||||
|
|
||||||
# 6. Test locally (after DLO validation passes)
|
# 6. Test locally (after DLO validation passes)
|
||||||
sf data-code-extension script run --entrypoint ./payload/entrypoint.py --target-org afvibe
|
sf data-code-extension script run --entrypoint ./payload/entrypoint.py --target-org afvibe
|
||||||
@ -603,7 +603,7 @@ ls payload/ # Should see entrypoint.py, config.json, requirements.txt
|
|||||||
|
|
||||||
**Use with DLO Schema Skill (CRITICAL for validation):**
|
**Use with DLO Schema Skill (CRITICAL for validation):**
|
||||||
|
|
||||||
The `datacloud_schema` skill is **required** for validating DLOs before testing code extensions.
|
The `getting-datacloud-schema` skill is **required** for validating DLOs before testing code extensions.
|
||||||
|
|
||||||
**Workflow Integration:**
|
**Workflow Integration:**
|
||||||
```
|
```
|
||||||
@ -626,10 +626,10 @@ The `datacloud_schema` skill is **required** for validating DLOs before testing
|
|||||||
**Example Integrated Workflow:**
|
**Example Integrated Workflow:**
|
||||||
```bash
|
```bash
|
||||||
# Step 1: Check what DLOs exist
|
# Step 1: Check what DLOs exist
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe
|
||||||
|
|
||||||
# Step 2: Get schema for source DLO
|
# Step 2: Get schema for source DLO
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
||||||
|
|
||||||
# Step 3: Design code extension based on schema
|
# Step 3: Design code extension based on schema
|
||||||
# (Write entrypoint.py using fields from schema)
|
# (Write entrypoint.py using fields from schema)
|
||||||
@ -639,8 +639,8 @@ sf data-code-extension script scan --entrypoint ./payload/entrypoint.py
|
|||||||
|
|
||||||
# Step 5: Validate all DLOs referenced in config.json
|
# Step 5: Validate all DLOs referenced in config.json
|
||||||
cat payload/config.json
|
cat payload/config.json
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee__dll
|
||||||
python3 ~/.a4drules/skills/datacloud_schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
python3 ~/.a4drules/skills/getting-datacloud-schema/scripts/get_dlo_schema.py afvibe Employee_Upper__dll
|
||||||
|
|
||||||
# Step 6: Test locally (after validation passes)
|
# Step 6: Test locally (after validation passes)
|
||||||
sf data-code-extension script run --entrypoint ./payload/entrypoint.py --target-org afvibe
|
sf data-code-extension script run --entrypoint ./payload/entrypoint.py --target-org afvibe
|
||||||
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: datacloud_schema
|
name: getting-datacloud-schema
|
||||||
description: Retrieve Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using REST APIs. Use this skill when you need to inspect DLO or DMO field definitions, data types, or metadata. Takes org alias and optional DLO/DMO name as parameters.
|
description: Retrieve Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using REST APIs. Use this skill when you need to inspect DLO or DMO field definitions, data types, or metadata. Takes org alias and optional DLO/DMO name as parameters.
|
||||||
---
|
---
|
||||||
|
|
||||||
# datacloud_schema Skill
|
# getting-datacloud-schema Skill
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# datacloud_schema Skill
|
# getting-datacloud-schema Skill
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ A Claude Code skill that retrieves Data Lake Object (DLO) and Data Model Object
|
|||||||
|
|
||||||
The skill is now installed at:
|
The skill is now installed at:
|
||||||
```
|
```
|
||||||
/home/codebuilder/dx-project/.a4drules/skills/datacloud_schema/
|
/home/codebuilder/dx-project/.a4drules/skills/getting-datacloud-schema/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -199,7 +199,7 @@ Fields (8 total):
|
|||||||
## Files
|
## Files
|
||||||
|
|
||||||
```
|
```
|
||||||
datacloud_schema/
|
getting-datacloud-schema/
|
||||||
├── SKILL.md # Skill definition and instructions
|
├── SKILL.md # Skill definition and instructions
|
||||||
├── docs/
|
├── docs/
|
||||||
│ └── README.md # This file
|
│ └── README.md # This file
|
||||||
Loading…
Reference in New Issue
Block a user