Power Query: queries and steps
Query lifecycle, applied steps, parameters, and folder navigation. Operations on this page: 13.
Query lifecycle, applied steps, parameters, and folder navigation. Terms are in the glossary.
Operations on this page — 13
commit_applied_step_editcommit_power_query_loaddelete_power_queryduplicate_power_querylist_power_query_definitionsmutate_applied_steppower_query_folder_navigatorpower_query_parameter_managerprofile_applied_step_columnsproject_applied_stepsreference_power_queryrename_power_querysave_power_query_definition
commit_applied_step_edit
Section titled “commit_applied_step_edit”Commits an edit to a query step.
Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "commit_applied_step_edit" |
yes |
mText |
string | yes |
queryStableId |
string | no |
stepId |
string | yes |
canonicalM |
string | yes |
editorSessionId |
string | no |
| generation | number | no |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · commit_applied_step_edit
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "commit_applied_step_edit" |
yes |
| result | StepMutationResult | yes |
Minimal JSON template
{ "operation": "commit_applied_step_edit", "mText": "<string>", "stepId": "<string>", "canonicalM": "<string>", "requestedBackend": "native-desktop"}commit_power_query_load
Section titled “commit_power_query_load”Commits a Power Query load.
Request
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "commit_power_query_load" |
yes | |
subsetId |
string | yes | |
loadPlan |
PowerQueryLoadPlan | yes | |
| query | unknown | yes | Opaque, secret-free Rust-owned persisted query record returned by evaluation. |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · commit_power_query_load
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "commit_power_query_load" |
yes | |
queryId |
string | yes | |
appliedEditCount |
number | yes | |
createdSheet |
boolean | yes | |
sheetKey |
string | no | |
staleClearCount |
number | yes | |
| projection | Extract< ComputeResponsePayload, { operation: "open_workbook_subset" } > |
yes | The workbook’s state after the edit is applied, obtained in the same session within one atomic operation. |
Minimal JSON template
{ "operation": "commit_power_query_load", "subsetId": "<subsetId>", "loadPlan": "<PowerQueryLoadPlan>", "query": "<unknown>", "requestedBackend": "native-desktop"}delete_power_query
Section titled “delete_power_query”Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “delete_power_query” | yes |
subsetId |
string | yes |
stableId |
string | yes |
Response on success · delete_power_query
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “delete_power_query” | yes |
| status | string | yes |
| reason | string | no |
removedDisplayName |
string | no |
Minimal JSON template
{ "operation": "delete_power_query", "subsetId": "<subsetId>", "stableId": "<stableId>"}duplicate_power_query
Section titled “duplicate_power_query”Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “duplicate_power_query” | yes |
subsetId |
string | yes |
stableId |
string | yes |
Response on success · duplicate_power_query
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “duplicate_power_query” | yes |
| status | string | yes |
| reason | string | no |
newStableId |
string | no |
newDisplayName |
string | no |
Minimal JSON template
{ "operation": "duplicate_power_query", "subsetId": "<subsetId>", "stableId": "<stableId>"}list_power_query_definitions
Section titled “list_power_query_definitions”Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “list_power_query_definitions” | yes |
subsetId |
string | yes |
Response on success · list_power_query_definitions
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “list_power_query_definitions” | yes |
| queries | unknown[] | yes |
Minimal JSON template
{ "operation": "list_power_query_definitions", "subsetId": "<subsetId>"}mutate_applied_step
Section titled “mutate_applied_step”Changes a query step.
Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "mutate_applied_step" |
yes |
mText |
string | yes |
queryStableId |
string | no |
| mutation | StepMutation | yes |
editorSessionId |
string | no |
| generation | number | no |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · mutate_applied_step
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "mutate_applied_step" |
yes |
| result | StepMutationResult | yes |
Minimal JSON template
{ "operation": "mutate_applied_step", "mText": "<string>", "mutation": "<StepMutation>", "requestedBackend": "native-desktop"}power_query_folder_navigator
Section titled “power_query_folder_navigator”Traversing a folder as a source: what files are in it, and what will come out of them.
Request
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "power_query_folder_navigator" |
yes | |
| action | string | yes | “list-entries” | “preview-entry” | “preview-combined” | “refresh” | “package-ledger” |
sourceKind |
"folder" | “json” | “xml” |
yes | |
rootUri |
string | yes | The folder address in the same form as in the transform operation above: file:///path with the include, exclude, and recursive parameters. |
entryId |
string | no | |
lineageJson |
string | no | |
savedDigest |
number | no | |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · power_query_folder_navigator
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "power_query_folder_navigator" |
yes |
| outcome | FolderNavigatorOutcome | yes |
Minimal JSON template
{ "operation": "power_query_folder_navigator", "action": "<string>", "sourceKind": "folder", "rootUri": "<string>", "requestedBackend": "native-desktop"}power_query_parameter_manager
Section titled “power_query_parameter_manager”Query parameters: creating, changing, and default values.
Request
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "power_query_parameter_manager" |
yes | |
subsetId |
string | yes | |
| action | string | yes | One of “create” | “edit” | “rename” | “duplicate” | “delete” | “list” | “set-value”. |
| dto | ContractParameterDTO | no | The full object: with create, its identifier is ignored; with edit, the field values are replaced entirely. |
| id | string | no | Target parameter’s stable id; required by edit/rename/duplicate/delete/set-value. |
| name | string | no | New display name; required by “rename”. |
| value | ContractParamValueRepr | no | New current value; required by “set-value”. |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · power_query_parameter_manager
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "power_query_parameter_manager" |
yes | |
| status | string | yes | |
| reason | string | null | no | |
| parameter | ContractParameterDTO | null | no | The parameter the action applied to, or the one it created. Absent from the response for list and on a refusal. |
| parameters | ContractParameterDTO[] | yes | Every parameter currently registered, in stable creation order. |
| recomputed | ContractRecomputedQueryStatus[] | yes | Present in the response only if edit or set-value actually changed the value. |
dependencyGraph |
ContractDependencyGraphSnapshot | null | no |
Minimal JSON template
{ "operation": "power_query_parameter_manager", "subsetId": "<subsetId>", "action": "<string>", "requestedBackend": "native-desktop"}profile_applied_step_columns
Section titled “profile_applied_step_columns”Profiles the columns of a query step.
Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "profile_applied_step_columns" |
yes |
mText |
string | yes |
queryStableId |
string | no |
stepId |
string | no |
editorSessionId |
string | no |
| generation | number | no |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · profile_applied_step_columns
| Field | TypeScript type | Req. | Note from the contract |
|---|---|---|---|
| operation | "profile_applied_step_columns" |
yes | |
| profiled | boolean | yes | true if the profile was computed successfully; false if the computation failed. |
| columns | ColumnProfile[] | yes | One profile per column of the result; empty if the computation failed. The core computes the values; the interface only displays them. |
rowCount |
number | yes | The actual number of rows in the result, not the sample size. |
| sampled | boolean | yes | true if the profile was built not from all the rows but from the start of the result: there were more rows than the sample limit. |
sampledRows |
number | yes | How many rows went into the profile: either all of them, or the sample limit — whichever is smaller. |
sampleCap |
number | yes | The row sample limit that was in effect for this pass. |
| block | { sourceId: string; mSource: string; reason: string; detail: string; } | no | The reason the profile couldn’t be built. There’s no such thing as a partial profile: it’s either complete, or this field holds the refusal reason. |
| session | EditorSessionStamp | no | A session marker returned in responses tied to a session. Calls without a session don’t have this field. |
Minimal JSON template
{ "operation": "profile_applied_step_columns", "mText": "<string>", "requestedBackend": "native-desktop"}project_applied_steps
Section titled “project_applied_steps”Projects the steps of a query.
Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "project_applied_steps" |
yes |
mText |
string | yes |
queryStableId |
string | no |
editorSessionId |
string | no |
| generation | number | no |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · project_applied_steps
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "project_applied_steps" |
yes |
| projection | AppliedStepsProjection | yes |
Minimal JSON template
{ "operation": "project_applied_steps", "mText": "<string>", "requestedBackend": "native-desktop"}reference_power_query
Section titled “reference_power_query”Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “reference_power_query” | yes |
subsetId |
string | yes |
stableId |
string | yes |
Response on success · reference_power_query
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “reference_power_query” | yes |
| status | string | yes |
| reason | string | no |
newStableId |
string | no |
newDisplayName |
string | no |
upstreamStableId |
string | no |
Minimal JSON template
{ "operation": "reference_power_query", "subsetId": "<subsetId>", "stableId": "<stableId>"}rename_power_query
Section titled “rename_power_query”Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “rename_power_query” | yes |
subsetId |
string | yes |
stableId |
string | yes |
newDisplayName |
string | yes |
Response on success · rename_power_query
| Field | TypeScript type | Req. |
|---|---|---|
| operation | “rename_power_query” | yes |
| status | string | yes |
| reason | string | no |
previousDisplayName |
string | no |
newDisplayName |
string | no |
Minimal JSON template
{ "operation": "rename_power_query", "subsetId": "<subsetId>", "stableId": "<stableId>", "newDisplayName": "<newDisplayName>"}save_power_query_definition
Section titled “save_power_query_definition”Saves a Power Query query definition.
Request
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "save_power_query_definition" |
yes |
subsetId |
string | yes |
| query | unknown | yes |
boundDestinationSheetKey |
string | no |
requestedBackend |
ComputeBackendKind | null | no |
Response on success · save_power_query_definition
| Field | TypeScript type | Req. |
|---|---|---|
| operation | "save_power_query_definition" |
yes |
| status | string | yes |
| reason | string | no |
Minimal JSON template
{ "operation": "save_power_query_definition", "subsetId": "<subsetId>", "query": "<unknown>", "requestedBackend": "native-desktop"}