Agent Skillsforcedotcom/sf-skills › data360-schema-get

data360-schema-get

GitHub

通过 Salesforce CLI 和 REST API 获取 Data Cloud 中 DLO 和 DMO 的 Schema 信息,包括字段定义、数据类型及元数据。支持列出所有对象或查询特定对象的详细结构,帮助用户探索和理解数据模型。

skills/data360-schema-get/SKILL.md forcedotcom/sf-skills

Trigger Scenarios

用户需要查看 Data Cloud 中的所有 DLO 或 DMO 列表 用户需要获取特定 DLO 或 DMO 的详细字段 Schema 和元数据 用户正在探索 Data Cloud 的数据结构

Install

npx skills add forcedotcom/sf-skills --skill data360-schema-get -g -y
More Options

Use without installing

npx skills use forcedotcom/sf-skills@data360-schema-get

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add forcedotcom/sf-skills --all -g -y

预览 repo 内 skill

npx skills add forcedotcom/sf-skills --list

SKILL.md

Frontmatter
{
    "name": "data360-schema-get",
    "metadata": {
        "version": "1.0"
    },
    "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."
}

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:

sf org list

Example output:

┌────┬───────┬──────────────────────────┬────────────────────┬───────────┐
│    │ Alias │ Username                 │ Org Id             │ Status    │
├────┼───────┼──────────────────────────┼────────────────────┼───────────┤
│ 🍁 │ myorg │ chandresh@afvidedemo.org │ 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:

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

If not connected, inform user to run:

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:

python3 ./scripts/get_dlo_schema.py <org_alias>

To get specific DLO schema:

python3 ./scripts/get_dlo_schema.py <org_alias> <dlo_name>

Step 3b: Execute DMO Schema Script

To list all DMOs:

python3 ./scripts/get_dmo_schema.py <org_alias>

To get specific DMO schema:

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

GET /services/data/v64.0/ssot/data-lake-objects

Response structure:

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

Get DLO Schema

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

GET /services/data/v64.0/ssot/data-model-objects

Response structure:

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

Get DMO Schema

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
  3. DMO not found

    • Message: "DMO 'XYZ__dlm' not found"
    • Solution: List all DMOs first to verify name
  4. Permission issues

    • Message: HTTP 403 errors
    • Solution: Verify user has Data Cloud permissions
  5. API version mismatch

    • Current: v64.0
    • Solution: Script can be updated for newer API versions

Example Usage

Example 1: List all DLOs

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

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

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

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

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

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

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

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

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

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

Version History

  • 1.29.0 Current 2026-07-05 18:48

Same Skill Collection

skills/automation-flow-generate/SKILL.md
skills/commerce-b2b-open-code-components-integrate/SKILL.md
skills/commerce-b2b-store-create/SKILL.md
skills/data360-activate/SKILL.md
skills/data360-code-extension-generate/SKILL.md
skills/data360-prepare/SKILL.md
skills/design-systems-slds-apply/SKILL.md
skills/dx-org-permission-set-assign/SKILL.md
skills/dx-org-switch/SKILL.md
skills/experience-lwc-generate/SKILL.md
skills/experience-ui-bundle-features-generate/SKILL.md
skills/experience-ui-bundle-file-upload-generate/SKILL.md
skills/experience-ui-bundle-metadata-generate/SKILL.md
skills/experience-ui-bundle-site-generate/SKILL.md
skills/external-diagram-visual-generate/SKILL.md
skills/platform-apex-logs-debug/SKILL.md
skills/platform-custom-application-generate/SKILL.md
skills/platform-custom-tab-generate/SKILL.md
skills/platform-lightning-app-coordinate/SKILL.md
skills/platform-list-view-generate/SKILL.md
skills/platform-metadata-deploy/SKILL.md
skills/platform-permission-set-generate/SKILL.md
skills/platform-validation-rule-generate/SKILL.md
skills/agentforce-architecture-analyze/SKILL.md
skills/agentforce-d360-analyze/SKILL.md
skills/agentforce-generate/SKILL.md
skills/agentforce-observe/SKILL.md
skills/agentforce-test/SKILL.md
skills/commerce-b2b-open-code-components-replace/SKILL.md
skills/data360-connect/SKILL.md
skills/data360-harmonize/SKILL.md
skills/data360-orchestrate/SKILL.md
skills/data360-query/SKILL.md
skills/data360-segment/SKILL.md
skills/design-systems-slds-validate/SKILL.md
skills/design-systems-slds2-migrate/SKILL.md
skills/dx-app-analytics-query/SKILL.md
skills/dx-code-analyzer-configure/SKILL.md
skills/dx-code-analyzer-custom-rule-create/SKILL.md
skills/dx-code-analyzer-run/SKILL.md
skills/dx-devops-test-failures-analyze/SKILL.md
skills/dx-devops-test-pipeline-configure/SKILL.md
skills/dx-devops-test-suite-assignments-configure/SKILL.md
skills/dx-devops-test-suite-run/SKILL.md
skills/dx-org-manage/SKILL.md
skills/experience-cms-brand-apply/SKILL.md
skills/experience-content-media-search/SKILL.md
skills/experience-ui-bundle-agentforce-client-generate/SKILL.md
skills/experience-ui-bundle-app-coordinate/SKILL.md
skills/experience-ui-bundle-custom-app-generate/SKILL.md
skills/experience-ui-bundle-deploy/SKILL.md
skills/experience-ui-bundle-frontend-generate/SKILL.md
skills/experience-ui-bundle-salesforce-data-access/SKILL.md
skills/external-diagram-mermaid-generate/SKILL.md
skills/integration-connectivity-connected-app-configure/SKILL.md
skills/integration-connectivity-generate/SKILL.md
skills/integration-eventing-cdc-configure/SKILL.md
skills/integration-eventing-subscription-configure/SKILL.md
skills/mobile-apps-create/SKILL.md
skills/mobile-platform-native-capabilities-integrate/SKILL.md
skills/mobile-platform-offline-validate/SKILL.md
skills/omnistudio-callable-apex-generate/SKILL.md
skills/omnistudio-datamapper-generate/SKILL.md
skills/omnistudio-datapacks-deploy/SKILL.md
skills/omnistudio-dependencies-analyze/SKILL.md
skills/omnistudio-epc-catalog-generate/SKILL.md
skills/omnistudio-flexcard-generate/SKILL.md
skills/omnistudio-integration-procedure-generate/SKILL.md
skills/omnistudio-omniscript-generate/SKILL.md
skills/platform-agentexchange-partner-offers-configure/SKILL.md
skills/platform-agentsetup-categories-fetch/SKILL.md
skills/platform-apex-generate/SKILL.md
skills/platform-apex-test-generate/SKILL.md
skills/platform-apex-test-run/SKILL.md
skills/platform-custom-field-generate/SKILL.md
skills/platform-custom-lightning-type-generate/SKILL.md
skills/platform-custom-object-generate/SKILL.md
skills/platform-data-manage/SKILL.md
skills/platform-docs-get/SKILL.md
skills/platform-flexipage-generate/SKILL.md
skills/platform-metadata-api-context-get/SKILL.md
skills/platform-metadata-retrieve/SKILL.md
skills/platform-sharing-rules-generate/SKILL.md
skills/platform-soql-query/SKILL.md
skills/platform-tracing-agentforce-configure/SKILL.md
skills/platform-tracing-configure/SKILL.md
skills/platform-trust-archive-manage/SKILL.md
skills/platform-value-set-generate/SKILL.md

Metadata

Files
0
Version
1.29.0
Hash
cfea108f
Indexed
2026-07-05 18:48

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 21:11
浙ICP备14020137号-1 $Гость$