Azure Queries

Azure Queries

Certified

Run multiple Cosmos queries

Executes labeled Cosmos SQL queries in one task; each label returns its own result set. Partition scoping and region exclusion are per-query.

yaml
type: io.kestra.plugin.azure.storage.cosmosdb.Queries
yaml
id: azure_storage_cosmos_queries
namespace: company.team

tasks:
  - id: cosmos_queries
    type: io.kestra.plugin.azure.storage.cosmosdb.Queries
    endpoint: "https://yourcosmosaccount.documents.azure.com"
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    queries:
      query-one:
        query: SELECT * FROM c
      query-two:
        query: SELECT * FROM c WHERE c.id = 'test'
        partitionKeyDefinition:
          paths: ["/id"]
          kind: HASH
          version: V2
        partitionKey:
          id: test
Properties

Container ID

Container (collection) name within the database; must already exist.

Database ID

Target database name inside the account; required.

Named queries to execute

Map of label to query options; entries run independently and return under the same label.

Azure AD tenant ID (GUID)

Client ID of the Azure AD application

Application (client) ID used for service principal authentication.

Client secret for the Azure AD application

Secret value associated with the client ID; store in a Kestra secret.

Cosmos connection string

Full connection string from Azure portal; overrides endpoint and Azure AD credentials when set.

DefaultSession
Possible Values
STRONGBOUNDED_STALENESSSESSIONEVENTUALCONSISTENT_PREFIX

Choose request consistency

Consistency level sent to Cosmos; defaults to SESSION.

Defaulttrue

Return payload on writes

When true (default), write responses include the document body; set false to reduce payload size.

Cosmos account endpoint

Base account URL (e.g. https://.documents.azure.com). Required when connectionString is absent.

PEM-encoded certificate content for client authentication

PEM text for certificate-based auth; alternative to clientSecret.

Reference (ref) of the pluginDefaults to apply to this task.

SubTypearray

Results