Del via


az managedcleanroom frontend analytics query

Note

This reference is part of the managedcleanroom extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az managedcleanroom frontend analytics query command. Learn more about extensions.

Manage collaboration queries.

Commands

Name Description Type Status
az managedcleanroom frontend analytics query list

List queries for a collaboration.

Extension GA
az managedcleanroom frontend analytics query publish

Publish a query to the collaboration.

Extension GA
az managedcleanroom frontend analytics query run

Run a query in the collaboration.

Extension GA
az managedcleanroom frontend analytics query runhistory

View query run history.

Extension GA
az managedcleanroom frontend analytics query runhistory list

List query run history.

Extension GA
az managedcleanroom frontend analytics query runresult

View query run results.

Extension GA
az managedcleanroom frontend analytics query runresult show

Show details of a query run result.

Extension GA
az managedcleanroom frontend analytics query show

Show query details.

Extension GA
az managedcleanroom frontend analytics query vote

Vote on a query (accept or reject).

Extension GA

az managedcleanroom frontend analytics query list

List queries for a collaboration.

az managedcleanroom frontend analytics query list --collaboration-id
                                                  [--api-version {2026-03-01-preview}]

Examples

List queries

az managedcleanroom frontend analytics query list -c <collaboration-id>

Required Parameters

--collaboration-id -c

Collaboration identifier.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--api-version

API version to use for this request. Default: 2026-03-01-preview.

Property Value
Default value: 2026-03-01-preview
Accepted values: 2026-03-01-preview
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az managedcleanroom frontend analytics query publish

Publish a query to the collaboration.

Publish a query configuration with SQL segments, execution sequence, and dataset mappings. Query segments can be provided as @file.json (full segment object including executionSequence) or as inline SQL strings (requires --execution-sequence parameter). The execution sequence defines which segments run in parallel (same number) or sequentially (different numbers). Cannot mix @file.json and inline SQL segments in the same command.

az managedcleanroom frontend analytics query publish --collaboration-id
                                                     --document-id
                                                     [--api-version {2026-03-01-preview}]
                                                     [--body]
                                                     [--execution-sequence]
                                                     [--input-datasets]
                                                     [--output-dataset]
                                                     [--query-segment]

Examples

Publish a query with segments from JSON files (segment files include executionSequence)

az managedcleanroom frontend analytics query publish \
  --collaboration-id my-collab-123 \
  --document-id my-query \
  --query-segment @segment1.json \
  --query-segment @segment2.json \
  --query-segment @segment3.json \
  --input-datasets "dataset1:view1,dataset2:view2" \
  --output-dataset "output-dataset:results"

Note: Each segment JSON file should contain:
data, executionSequence, preConditions, postFilters fields

Publish a query with inline SQL segments (requires --execution-sequence)

az managedcleanroom frontend analytics query publish \
  --collaboration-id my-collab-123 \
  --document-id my-query \
  --query-segment "SELECT * FROM table1" \
  --query-segment "SELECT * FROM table2" \
  --execution-sequence "1,2" \
  --input-datasets "dataset1:view1" \
  --output-dataset "output-dataset:results"

Publish a query using a JSON body file (legacy mode)

az managedcleanroom frontend analytics query publish               --collaboration-id my-collab-123               --document-id my-query               --body @query-config.json

Required Parameters

--collaboration-id -c

Collaboration identifier.

--document-id -d

Query document identifier.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--api-version

API version to use for this request. Default: 2026-03-01-preview.

Property Value
Default value: 2026-03-01-preview
Accepted values: 2026-03-01-preview
--body

JSON configuration file path (@file.json) or JSON string (legacy mode).

--execution-sequence

Comma-separated execution sequence numbers (e.g., "1,1,2"). Must match segment count.

--input-datasets

Comma-separated input datasets as datasetId:viewName pairs.

--output-dataset

Output dataset as datasetId:viewName.

--query-segment

Query segment SQL (@file.sql or inline). Repeatable. Order matters.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az managedcleanroom frontend analytics query run

Run a query in the collaboration.

Execute a published query with optional configuration parameters. A run ID is automatically generated if not provided.

az managedcleanroom frontend analytics query run --collaboration-id
                                                 --document-id
                                                 [--api-version {2026-03-01-preview}]
                                                 [--body]
                                                 [--dry-run]
                                                 [--end-date]
                                                 [--start-date]
                                                 [--use-optimizer]

Examples

Run a query with default settings

az managedcleanroom frontend analytics query run               --collaboration-id my-collab-123               --document-id my-query

Run a query with dry run and date range

az managedcleanroom frontend analytics query run               --collaboration-id my-collab-123               --document-id my-query               --dry-run               --start-date "2024-01-01"               --end-date "2024-12-31"

Run a query with optimizer enabled

az managedcleanroom frontend analytics query run               --collaboration-id my-collab-123               --document-id my-query               --use-optimizer

Run a query using a JSON body file (legacy mode)

az managedcleanroom frontend analytics query run               --collaboration-id my-collab-123               --document-id my-query               --body @run-config.json

Required Parameters

--collaboration-id -c

Collaboration identifier.

--document-id -d

Query document identifier.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--api-version

API version to use for this request. Default: 2026-03-01-preview.

Property Value
Default value: 2026-03-01-preview
Accepted values: 2026-03-01-preview
--body

JSON configuration file path (@file.json) or JSON string (legacy mode).

--dry-run

Perform a dry run without executing the query.

Property Value
Default value: False
--end-date

End date for query execution.

--start-date

Start date for query execution.

--use-optimizer

Use query optimizer.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az managedcleanroom frontend analytics query show

Show query details.

az managedcleanroom frontend analytics query show --collaboration-id
                                                  --document-id
                                                  [--api-version {2026-03-01-preview}]

Examples

Show query details

az managedcleanroom frontend analytics query show -c <cid> -d <document-id>

Required Parameters

--collaboration-id -c

Collaboration identifier.

--document-id -d

Document identifier (dataset, query, or consent document).

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--api-version

API version to use for this request. Default: 2026-03-01-preview.

Property Value
Default value: 2026-03-01-preview
Accepted values: 2026-03-01-preview
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az managedcleanroom frontend analytics query vote

Vote on a query (accept or reject).

Submits a vote for a query in the collaboration. This unified endpoint allows you to accept or reject a query with a single command.

This command replaces the deprecated 'vote accept' and 'vote reject' commands in version 1.0.0b4.

az managedcleanroom frontend analytics query vote --collaboration-id
                                                  --document-id
                                                  --vote-action
                                                  [--api-version {2026-03-01-preview}]
                                                  [--proposal-id]

Examples

Accept a query vote

az managedcleanroom frontend analytics query vote               --collaboration-id <cid>               --document-id <document-id>               --vote-action accept

Reject a query vote

az managedcleanroom frontend analytics query vote               --collaboration-id <cid>               --document-id <document-id>               --vote-action reject

Accept query vote (short form)

az managedcleanroom frontend analytics query vote -c <cid> -d <doc-id> --vote-action accept

Required Parameters

--collaboration-id -c

Collaboration identifier.

--document-id -d

Document identifier (dataset, query, or consent document).

--vote-action

Vote action (accept or reject).

The vote action to perform:

  • accept: Approve the query
  • reject: Reject the query.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--api-version

API version to use for this request. Default: 2026-03-01-preview.

Property Value
Default value: 2026-03-01-preview
Accepted values: 2026-03-01-preview
--proposal-id

Optional proposal ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False