К основному содержанию
скилл CX Codex

data360-schema-get — скилл для Claude Code: схема DLO и DMO

Достаёт из Salesforce Data Cloud список объектов Data Lake и Data Model и поля конкретного объекта. Пригодится, когда надо посмотреть структуру данных перед запросом.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add forcedotcom/sf-skills --skill data360-schema-get -a claude-code
Открыть на GitHub

Что делает data360-schema-get

Скилл обращается к SSOT REST API Data Cloud и возвращает либо перечень всех DLO или DMO в организации, либо подробную схему одного объекта: имена полей, типы, признак первичного ключа, nullable. Список DLO показывает категорию, статус и число записей, так что сразу видно, где лежат данные, а где пусто.

Внутри два Python-скрипта в подкаталоге scripts/: get_dlo_schema.py и get_dmo_schema.py. Первым аргументом идёт alias организации из SF CLI, вторым — необязательное developer name объекта вроде Employee__dll или Individual__dlm. Перед вызовом скилл сам прогоняет sf org list и sf org display --target-org <org_alias> --json, чтобы убедиться, что организация подключена.

Нужны sf CLI версии 2.0.0 и выше, python3 от 3.10.0 и pip от 23.0.0, а также включённый Data Cloud и права на него в целевой организации. Если объект не найден, скрипт скажет об этом прямо — тогда сначала запросите полный список и сверьте developer name. Ошибка 403 означает, что прав на Data Cloud у пользователя нет, и доступа к схеме не будет, пока их не выдадут.

Какие задачи решает

  • посмотреть все DLO в организации Data Cloud
  • вытащить типы полей конкретного DMO
  • найти первичный ключ и nullable-поля объекта
  • отличить кастомные поля от системных вроде cdp_sys_*
  • проверить, в каком DLO есть записи, а в каком ноль

Примеры запросов агенту

  • Покажи все DLO в организации myorg
  • Дай схему полей Employee__dll в afvibe
  • Какие DMO есть в myorg и какие поля у Individual__dlm

Как установить data360-schema-get

1Через Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill data360-schema-get -a claude-code

2Вручную: положить файлы

~/.claude/skills/data360-schema-get/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/data360-schema-get/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о data360-schema-get

Как установить data360-schema-get в Claude?

Выполните npx skills add forcedotcom/sf-skills --skill data360-schema-get -a claude-code. Скилл встанет в ~/.claude/skills/data360-schema-get/SKILL.md.

Что делает data360-schema-get?

Через SSOT REST API Data Cloud получает список DLO или DMO и схему полей конкретного объекта: тип, первичный ключ, nullable, число записей.

Что нужно, чтобы скилл заработал?

Установленный и авторизованный sf CLI, python3 от 3.10.0, pip от 23.0.0, включённый Data Cloud и права на него. Без авторизации в организации скрипты не отработают.

Исходный текст

SKILL.md · Apache-2.0
---
name: data360-schema-get
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."
metadata:
  version: "1.0"
  domains: ["Data 360"]
  cliTools:
    - tool: ["pip"]
      semver: ">=23.0.0"
    - tool: ["python3"]
      semver: ">=3.10.0"
    - tool: ["sf"]
      semver: ">=2.0.0"
---

# data360-schema-get Skill


## Overview

This skill retrieves Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using the SSOT REST API. It can list all DLOs or DMOs in an org, or retrieve detailed schema for a specific DLO or DMO.

## When to Use

- User wants to see all DLOs or DMOs in a Data Cloud org
- User needs field schema for a specific DLO or DMO
- User is exploring Data Cloud data structures
- User needs to understand DLO or DMO field types and metadata

## Prerequisites

- SF CLI installed and authenticated to target org
- Org has Data Cloud enabled
- User has appropriate Data Cloud permissions

## Skill Execution

### Parameters

1. **org_alias** (required): The SF CLI org alias (e.g., 'afvibe', 'myorg')
2. **dlo_name** (optional): Specific DLO developer name (e.g., 'Employee__dll')
3. **dmo_name** (optional): Specific DMO developer name (e.g., 'Individual__dlm')

### Step 1: Discover Connected Org

First, run `sf org list` to find out which org is connected and extract the alias to use for all subsequent calls:

```bash
sf org list
```

Example output:
```text
┌────┬───────┬──────────────────────────┬────────────────────┬───────────┐
│    │ Alias │ Username                 │ Org Id             │ Status    │
├────┼───────┼──────────────────────────┼────────────────────┼───────────┤
│    │ myorg │ [email protected] │ 00DKZ00000b80NT2AY │ Connected │
└────┴───────┴──────────────────────────┴────────────────────┴───────────┘
```

Extract the **Alias** value (e.g., `myorg`) from the output and use it as the `<org_alias>` for all subsequent calls. Use `--all` to see expired and deleted scratch orgs as well.

### Step 2: Validate SF CLI Authentication

Before making API calls, verify the org is connected:

```bash
sf org display --target-org <org_alias> --json
```

If not connected, inform user to run:
```bash
sf org login web --alias <org_alias>
```

### Step 3a: Execute DLO Schema Script

The Python scripts are bundled with this skill in the `scripts/` subdirectory.

**To list all DLOs:**
```bash
python3 ./scripts/get_dlo_schema.py <org_alias>
```

**To get specific DLO schema:**
```bash
python3 ./scripts/get_dlo_schema.py <org_alias> <dlo_name>
```

### Step 3b: Execute DMO Schema Script

**To list all DMOs:**
```bash
python3 ./scripts/get_dmo_schema.py <org_alias>
```

**To get specific DMO schema:**
```bash
python3 ./scripts/get_dmo_schema.py <org_alias> <dmo_name>
```

### Step 4: Present Results

Parse and present the results in a user-friendly format:

**For DLO List:**
- Show DLO name, label, category, and ID
- Indicate total count
- Highlight DLOs with data (totalRecords > 0)

**For DLO Schema:**
- Show basic info (name, label, category, status)
- List all fields with:
  - Field name
  - Data type
  - Primary key indicator
  - Nullable status
- Highlight custom fields (exclude system fields like DataSource__c, cdp_sys_*)
- Show record count if available

**For DMO List:**
- Show DMO name, label, category, and ID
- Indicate total count

**For DMO Schema:**
- Show basic info (name, label, category, description)
- List all fields with:
  - Field name
  - Data type
  - Primary key indicator
  - Nullable status
- Show dataspace information if available

### Step 5: Offer Next Steps

After displaying results, suggest relevant follow-up actions:
- Query data from the DLO
- Create calculated insights
- Build segments
- Set up data streams
- Create DMO mappings

## API Endpoints Used

### List All DLOs
```text
GET /services/data/v64.0/ssot/data-lake-objects
```

Response structure:
```json
{
  "dataLakeObjects": [
    {
      "name": "Employee__dll",
      "label": "Employee",
      "category": "Profile",
      "id": "1dlXXXXXXXXXXXXXXX",
      "status": "ACTIVE",
      "totalRecords": 12,
      "fields": [...]
    }
  ],
  "totalSize": 5
}
```

### Get DLO Schema
```text
GET /services/data/v64.0/ssot/data-lake-objects/{dlo_name}
```

Response structure (same as individual object in list response, but wrapped in paginated format).

### List All DMOs
```text
GET /services/data/v64.0/ssot/data-model-objects
```

Response structure:
```json
{
  "dataModelObjects": [
    {
      "name": "Individual__dlm",
      "label": "Individual",
      "category": "Profile",
      "id": "0dmXXXXXXXXXXXXXXX",
      "fields": [...]
    }
  ],
  "totalSize": 10
}
```

### Get DMO Schema
```text
GET /services/data/v64.0/ssot/data-model-objects/{dmo_name}
```

Response structure (same as individual object in list response, but wrapped in paginated format).

## Error Handling

**Common Issues:**

1. **Org not connected**
   - Message: "Org not connected"
   - Solution: Ask user to authenticate via SF CLI

2. **DLO not found**
   - Message: "DLO 'XYZ__dll' not found"
   - Solution: List all DLOs first to verify name

5. **DMO not found**
   - Message: "DMO 'XYZ__dlm' not found"
   - Solution: List all DMOs first to verify name

3. **Permission issues**
   - Message: HTTP 403 errors
   - Solution: Verify user has Data Cloud permissions

4. **API version mismatch**
   - Current: v64.0
   - Solution: Script can be updated for newer API versions

## Example Usage

**Example 1: List all DLOs**
```text
User: "Show me all DLOs in afvibe org"

Response:
1. Run sf org list to discover connected org alias
2. Authenticate to afvibe
3. Run: python3 ./scripts/get_dlo_schema.py afvibe
4. Display formatted list of DLOs
```

**Example 2: Get specific DLO schema**
```text
User: "Get the schema for Employee__dll in afvibe"

Response:
1. Run sf org list to discover connected org alias
2. Authenticate to afvibe
3. Run: python3 ./scripts/get_dlo_schema.py afvibe Employee__dll
4. Display field schema with types and metadata
```

**Example 3: Explore DLOs then get schema**
```text
User: "What DLOs exist in myorg and show me the schema for the Employee one"

Response:
1. Run sf org list to discover connected org alias
2. List all DLOs in myorg
3. Identify Employee__dll
4. Get detailed schema for Employee__dll
5. Present both results
```

**Example 4: List all DMOs**
```text
User: "Show me all DMOs in afvibe org"

Response:
1. Run sf org list to discover connected org alias
2. Authenticate to afvibe
3. Run: python3 ./scripts/get_dmo_schema.py afvibe
4. Display formatted list of DMOs
```

**Example 5: Get specific DMO schema**
```text
User: "Get the schema for Individual__dlm in afvibe"

Response:
1. Run sf org list to discover connected org alias
2. Authenticate to afvibe
3. Run: python3 ./scripts/get_dmo_schema.py afvibe Individual__dlm
4. Display field schema with types and metadata
```

**Example 6: Explore DMOs then get schema**
```text
User: "What DMOs exist in myorg and show me the schema for the Individual one"

Response:
1. Run sf org list to discover connected org alias
2. List all DMOs in myorg
3. Identify Individual__dlm
4. Get detailed schema for Individual__dlm
5. Present both results
```

## Output Format

### DLO List Output
```text
Found 5 DLOs in org 'afvibe':

1. DataCustomCodeLogs__dll
   Label: DataCustomCodeLogs
   Category: Engagement
   Records: 233

2. Employee__dll
   Label: Employee
   Category: Profile
   Records: 12

[...]
```

### DLO Schema Output
```yaml
DLO: Employee__dll
Label: Employee
Category: Profile
Status: ACTIVE
Records: 12

Custom Fields:
  • id__c (Text) - Primary Key
  • name__c (Text)
  • position__c (Text)
  • manager_id__c (Number)

System Fields:
  • DataSource__c (Text)
  • InternalOrganization__c (Text)
  • cdp_sys_SourceVersion__c (Text)

Next steps:
- Query data: SELECT * FROM Employee__dll LIMIT 10
- Create segment based on position field
- Set up data stream for real-time updates
```

### DMO List Output
```text
Found 10 DMOs in org 'afvibe':

1. Individual__dlm
   Label: Individual
   Category: Profile

2. ContactPointEmail__dlm
   Label: Contact Point Email
   Category: Profile

[...]
```

### DMO Schema Output
```yaml
DMO: Individual__dlm
Label: Individual
Category: Profile
Description: Represents an individual person

Fields:
  • Id__c (Text) - Primary Key
  • FirstName__c (Text)
  • LastName__c (Text)
  • BirthDate__c (DateTime)

Next steps:
- Query data: SELECT * FROM Individual__dlm LIMIT 10
- View DLO mappings to this DMO
- Create calculated insights
```

## Notes

- DLO names always end with `__dll` suffix
- DMO names always end with `__dlm` suffix
- Field names always end with `__c` suffix
- System fields (DataSource__c, KQ_*, cdp_sys_*) are automatically added
- Primary key fields are required for DLO and DMO queries
- API supports pagination (limit/offset) for large result sets

## Related Skills

- **datakit_workflow**: For DMO mapping operations
- **datakit_validation**: For validating datakit configurations
- Use this skill before creating DMO mappings to understand source DLO structure

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Похожие скиллы

Все скиллы по теме «Данные и базы» →
convex-schema-validator waynesutton Проектирует таблицы, валидаторы, индексы и связи в convex/schema.ts. Пригодится при ошибках проверки схемы и развитии модели данных. CX Codex +1 3 000установок dms-schema-conversion aws Ведёт миграцию схем между разными движками БД через AWS DMS Schema Conversion: создаёт проект, оценивает совместимость, конвертирует DDL. CX Codex +1 4 700установок planetscale-schema-recommendations-agent-loop planetscale Превращает открытые рекомендации PlanetScale в план, issue, ветку или PR. Продовые изменения сам не применяет. CX Codex +1 1 800установок database-schema alinaqi Скилл заставляет агента прочитать схему базы и проверить колонки с типами до того, как он напишет запрос или миграцию. CX Codex +1 302установок geo-schema geo-seo-claude Проверяет разметку JSON-LD, Microdata и RDFa на страницах сайта и генерирует готовые блоки данных под требования поисковых систем и нейросетей. CX Codex +1 915установок salesforce-developer https://github.com/Jeffallan Пишет Apex-классы, собирает Lightning Web Components, оптимизирует SOQL-запросы и настраивает пакетную обработку на платформе Salesforce. Следит за governor limits и булкифицирует код. CX Codex +1 4 300установок

Из того же набора167

dx-devops-test-suite-run Запускает наборы тестов DevOps Center на стадиях пайплайна Salesforce и опрашивает статус до завершения. Пригодится перед продвижением изменений и для повторной проверки Quality Gate. CX Codex +1 5 000установок dx-devops-test-suite-assignments-configure Подбирает тест-наборы под конкретный коммит и раскладывает их по стадиям пайплайна DevOps Center. Пригодится, когда непонятно, что запускать после правок. CX Codex +1 5 000установок dx-devops-test-pipeline-configure Настраивает тестовую инфраструктуру пайплайна DevOps Center: включает провайдера тестов, обновляет список сьютов или ставит quality gate на стадию. CX Codex +1 5 000установок experience-ui-bundle-site-generate Создаёт метаданные Digital Experience Site для хостинга React UI bundles в Salesforce. Пригодится, когда нужно развернуть контейнер сайта и настроить языковые параметры. CX Codex +1 5 000установок data360-code-extension-generate Скилл помогает создавать, тестировать и развёртывать расширения на Python для Salesforce Data Cloud через плагин SF CLI. Пригодится при написании пакетных скриптов и функций реального времени. CX Codex +1 4 900установок mobile-apps-create Маршрутизирует разработку нативных мобильных приложений Salesforce на Swift и Kotlin, разделяя задачи между Mobile SDK и Agentforce SDK. CX Codex +1 4 800установок omnistudio-epc-catalog-generate Создаёт и проверяет EPC-каталоги Salesforce Industries: записи Product2, атрибуты и состав пакетных предложений. Нужен при работе с DataPack JSON для офферов. CX Codex +1 4 800установок omnistudio-datapacks-deploy Скилл для развёртывания OmniStudio и Vlocity DataPack через Vlocity Build: экспорт, деплой, повторные попытки и разбор ошибок миграции. CX Codex +1 4 800установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой