query_sql
Generate the SQL that Looker would run for a query, enabling review and debugging without actual execution.
Instructions
Generate the SQL that Looker would execute for a query, without actually running it. Useful for reviewing or debugging queries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | LookML model name | |
| view | Yes | Explore/view name | |
| fields | Yes | Fields to select | |
| filters | No | Filter expressions | |
| sorts | No | Sort expressions | |
| limit | No | Maximum rows | |
| dev_mode | No | Compile the SQL against the dev workspace's LookML rather than production. Implied when ``branch`` is set. | |
| branch | No | Project branch to atomically swap to for this call (saved branch restored on exit). Requires project_id. | |
| project_id | No | LookML project ID — required with ``branch`` | |
| act_as_user | No | Optional Looker user ID or email to impersonate for this call. Use to operate on another user's dev workspace (Looker dev mode is per-user-isolated) or to run as a dedicated CI service user. Requires sudo capability on the configured admin credentials. When omitted, the call uses the configured or gateway-provided identity. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |