retrieving-datacloud
forcedotcom/sf-skills
Query, search, and inspect Salesforce Data Cloud objects with SQL, vector search, and metadata introspection.
What is retrieving-datacloud?
Handles the retrieve phase for Data Cloud: running SQL queries (sync, paginated, async), vector and hybrid search, table describe, and metadata inspection. Use this when working with Data Cloud SQL, search indexes, or object schemas—not for standard CRM SOQL or segment design.
- Execute Data Cloud SQL queries in multiple shapes (sync, sqlv2, async) with appropriate result-set sizing
- Perform vector and hybrid semantic search against configured search indexes
- Inspect Data Cloud object schemas and field definitions via describe
- Manage search-index lifecycle operations and list available indexes
- Validate org readiness for retrieve operations before running queries
- Use prefilter constraints on hybrid search for structured result refinement
How to install retrieving-datacloud
npx skills add https://github.com/forcedotcom/sf-skills --skill retrieving-datacloud- External community sf data360 CLI plugin installed
- Data Cloud-enabled Salesforce org with appropriate permissions
- For search operations: existing search indexes configured in the org
How to use retrieving-datacloud
- 1.Run the readiness classifier to confirm org is ready for retrieve work: node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --json
- 2.Choose the appropriate query shape (COUNT for quick check, sqlv2 for medium sets, async for large exports)
- 3.Use describe to inspect table schema before writing queries: sf data360 query describe -o <org> --table <table_name>
- 4.List available search indexes if performing semantic search: sf data360 search-index list -o <org>
- 5.Execute the query or search command and verify results match expected row count or schema
- 6.Pass results to the next phase (segment design, harmonization, or follow-up analysis)
Use cases
- Run a COUNT query on a Data Cloud table to assess data volume before full retrieval
- Execute a large async query export from a Data Cloud object and poll for completion
- Search a knowledge base index using vector embeddings to find semantically similar documents
- Describe a Data Cloud object schema to understand available fields before writing SQL
- Perform hybrid search combining keyword matching with semantic similarity on a structured index
- Data Cloud practitioners building retrieval pipelines
- Agents orchestrating multi-phase Data Cloud workflows
- Developers querying Data Cloud for analytics or integration
- Teams performing semantic search on indexed Data Cloud objects
retrieving-datacloud FAQ
Use retrieving-datacloud for Data Cloud SQL, async queries, vector search, and metadata introspection. Use querying-soql only for standard CRM SOQL queries against Salesforce objects.
sql is for quick counts; sqlv2 handles medium result sets with pagination; async is for large exports that run in the background and must be polled for completion.
No. Vector and hybrid search require a pre-configured search index in the org. List indexes first with sf data360 search-index list to confirm availability.
It probes the org to confirm Data Cloud is enabled, the data360 plugin is working, and the retrieve phase surfaces are accessible before you run actual queries.
No. Prefilter only works on fields explicitly configured as prefilter-capable when the search index was created. Check your index definition first.
Full instructions (SKILL.md)
Source of truth, from forcedotcom/sf-skills.
name: retrieving-datacloud description: "Salesforce Data Cloud Retrieve phase. Use this skill when the user runs Data Cloud SQL, async queries, vector search, search-index workflows, or metadata introspection for Data Cloud objects. TRIGGER when: user runs Data Cloud SQL, describe, async queries, vector search, search-index workflows, or metadata introspection for Data Cloud objects. DO NOT TRIGGER when: the task is standard CRM SOQL (use querying-soql), segment creation or calculated insight design (use segmenting-datacloud), or STDM/session tracing/parquet analysis (use observing-agentforce)." compatibility: "Requires an external community sf data360 CLI plugin and a Data Cloud-enabled org" metadata: version: "1.0"
retrieving-datacloud: Data Cloud Retrieve Phase
Use this skill when the user needs query, search, and metadata introspection for Data Cloud: sync SQL, paginated SQL, async query workflows, table describe, vector search, hybrid search, or search index operations.
When This Skill Owns the Task
Use retrieving-datacloud when the work involves:
sf data360 query *sf data360 search-index *sf data360 metadata *sf data360 profile *orsf data360 insight *inspection- understanding Data Cloud SQL results or query shape
Delegate elsewhere when the user is:
- writing standard CRM SOQL only → querying-soql
- designing segment or calculated insight assets → segmenting-datacloud
- analyzing STDM/session tracing/parquet telemetry → observing-agentforce
Required Context to Gather First
Ask for or infer:
- target org alias
- whether the user needs quick count, medium result set, large export, schema inspection, or semantic search
- table/index name if known
- whether the task is read-only SQL or search-index lifecycle management
Core Operating Rules
- Treat Data Cloud SQL as its own query language, not SOQL.
- Run the shared readiness classifier before relying on query/search surfaces:
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --json. - Use describe before guessing columns.
- Prefer
sqlv2or async query flows for larger result sets. - Use vector search or hybrid search only when the search index lifecycle is healthy.
- Keep STDM/parquet/session-tracing workflows out of this skill family.
Recommended Workflow
1. Classify readiness for retrieve work
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --json
# optional query-plane probe, only with a real table name
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --describe-table MyDMO__dlm --json
2. Choose the smallest correct query shape
sf data360 query sql -o <org> --sql 'SELECT COUNT(*) FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query sqlv2 -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query async-create -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null
3. Use describe before guessing fields
sf data360 query describe -o <org> --table ssot__Individual__dlm 2>/dev/null
4. Use vector or hybrid search only when an index exists
sf data360 search-index list -o <org> 2>/dev/null
sf data360 query vector -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Insurance_Index --query "weather damage coverage" --prefilter "Type_of_Insurance__c='Home'" --limit 10 2>/dev/null
5. Reuse curated search-index examples when creating indexes
Use the phase-owned examples instead of inventing JSON from scratch:
examples/search-indexes/vector-knowledge.jsonexamples/search-indexes/hybrid-structured.json
High-Signal Gotchas
- Data Cloud SQL is not SOQL.
- Table names should be double-quoted in SQL.
sqlv2is better than ad hoc OFFSET paging for medium result sets.- async query is preferable for large results.
- search-index operations and vector/hybrid queries depend on the index lifecycle being healthy.
- Hybrid search can use
--prefilter, but only on fields configured as prefilter-capable when the search index was created. - HNSW index parameters are typically read-only on create; leave
userValues: []unless the platform explicitly documents otherwise. query describeis not a universal tenant probe; only run it with a known DMO or DLO table after broader readiness has been confirmed.
Output Format
Retrieve task: <sql / sqlv2 / async / describe / vector / search-index>
Target org: <alias>
Target object: <table or index>
Commands: <key commands run>
Verification: <query rows / schema / status>
Next step: <segment / harmonize / follow-up>
References
- README.md
- examples/search-indexes/vector-knowledge.json
- examples/search-indexes/hybrid-structured.json
- ../orchestrating-datacloud/assets/definitions/search-index.template.json
- ../orchestrating-datacloud/references/plugin-setup.md
- ../orchestrating-datacloud/references/feature-readiness.md
Related skills
More from forcedotcom/sf-skills and the wider catalog.

reviewing-lwc-mobile-offline
Review Lightning Web Components for Salesforce Mobile App offline compatibility using Komaci static analysis.

running-apex-tests
Run Apex tests, analyze coverage, and fix failures with structured test-fix loops.

running-code-analyzer
Scan Salesforce code for security, performance, and quality violations across all engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru).

searching-media
Route and execute media searches across Salesforce CMS, Data 360, and other sources.

segmenting-datacloud
Create, publish, and troubleshoot Salesforce Data Cloud segments and calculated insights.

switching-org
Switch the active Salesforce org for CLI commands using the Salesforce CLI.