pq_set_table_query
Create or replace the Power Query M partition script for a Power BI TMDL table, creating the table file when it does not exist.
Instructions
Create or replace the Power Query M partition script for a table in the TMDL semantic model (creates the table file if it does not exist yet).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"tableName": "<tableName>",
"mExpression": "<mExpression>"
},
"name": "pq_set_table_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Storage mode (default: import) | |
| tableName | Yes | Target table name | |
| mExpression | Yes | Power Query M script (e.g. let ... in ...) | |
| projectPath | Yes | Path to the .pbip file or project root folder | |
| partitionName | No | Optional partition name (default: <tableName>-Partition) |