Actions15
- Item Actions
- Container Actions
- Database Actions
Item → Select
AI-generatedSummary
Select operation for Cosmos DB Item resource
Inputs
- databaseName (required) — Choose from the list, or specify an ID using an expression
- containerName (required) — Choose from the list, or specify an ID using an expression
- sqlQuery (required) — The SQL query to execute against the container
- returnAll — Whether to return all results or only up to a given limit
- limit — Max number of results to return
- simplifyOutput — Whether to exclude internal Cosmos DB fields (_rid, _self, _etag, _attachments, _ts)
- excludeFields — Whether to exclude additional specific fields from the results
- fieldsToExclude — Comma-separated list of field names to exclude from results
Output shape
array of objects, each containing a json field with a processed document and a pairedItem index.
Query execution uses container.items.query(sqlQuery).fetchAll(). Results are paginated by returnAll/limit. If simplifyOutput is true, internal Cosmos DB fields are removed. If excludeFields is true, specified field names are removed from each document.
Examples
Example 1: basic select with default settings
Execute SQL query against specified database and container, returning up to 50 results with internal fields simplified.