Skip to content

databricks-metric-views: wrong Statement Execution path /api/2.0/sql/statements/execute (should be /api/2.0/sql/statements) #259

Description

@dbx-shauver

Summary

databricks-metric-views documents the stable SQL Statement Execution REST call with a /execute suffix that does not exist. The correct path is POST /api/2.0/sql/statements (no /execute).

Locations (v0.2.12)

  1. skills/databricks-metric-views/SKILL.md:192 — "Statement Execution API (stable alternative)" example:
    databricks api post /api/2.0/sql/statements/execute --json '{ ... }'
    
  2. skills/databricks-metric-views/references/metric-view-advisor.md:74 — inline fallback note:
    ... fall back to the stable Statement Execution API (`databricks api post /api/2.0/sql/statements/execute --json '{...}'`) ...
    

Fix

Drop /execute in both places:

- databricks api post /api/2.0/sql/statements/execute --json '{ ... }'
+ databricks api post /api/2.0/sql/statements --json '{ ... }'

Evidence

Running the documented command errors:

$ databricks api post /api/2.0/sql/statements/execute --json '{"warehouse_id":"…","statement":"SELECT 1"}'
Error: No API found for 'POST /sql/statements/execute'

Dropping /execute works and returns a statement result. Confirmed against the official reference (the "Execute a SQL statement" operation is POST /api/2.0/sql/statements): https://docs.databricks.com/api/workspace/statementexecution

Impact

Anyone following the skill's stable-alternative path (e.g. to create a metric view when the experimental aitools verbs aren't available) hits an immediate 404. The experimental databricks experimental aitools tools statement submit --file path in the same skill is unaffected.

Environment

Databricks CLI v1.14.0; plugin databricks@0.2.12.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions