Skip to content

Document $psql / $psql-cancel and SQL Console changes - #11

Merged
andreyorst merged 6 commits into
mainfrom
sql-console-improvements-v3
Apr 29, 2026
Merged

andreyorst merged 6 commits into
mainfrom
sql-console-improvements-v3

Conversation

@andreyorst

Copy link
Copy Markdown
Contributor

Documents the SQL Console v3 changes shipping in edge (sansara PR #7487 / aidbox-ui PR #63):

  • docs/api/rest-api/other/sql-endpoints.md — new sections for $psql (and the $notebook-psql alias) and $psql-cancel. Documents the new response shape, all execution headers (X-Aidbox-Sql-Autocommit, -Timeout,
    -Read-Only, -Query-Id, -Async), the cancel flow, and the breaking change (old vector-of-debug-objects shape, execute=true query param, and \n----\n separator are gone).
  • docs/overview/release-notes.md — April 2026 edge entry covering the new features and breaking changes.
  • docs/overview/aidbox-ui/README.md — expanded the SQL Console blurb with per-tab settings, foreground / background execution, Tab-key indent, and pretty EXPLAIN.

Comment thread docs/api/rest-api/other/sql-endpoints.md Outdated
Comment thread docs/api/rest-api/other/sql-endpoints.md Outdated
Comment thread docs/api/rest-api/other/sql-endpoints.md Outdated
Comment thread docs/api/rest-api/other/sql-endpoints.md Outdated
Comment thread docs/overview/release-notes.md Outdated
Comment thread docs/overview/release-notes.md Outdated
Comment thread docs/overview/release-notes.md Outdated
Comment thread docs/overview/release-notes.md Outdated
@andreyorst
andreyorst requested a review from spicyfalafel April 29, 2026 08:46
Comment thread docs/overview/release-notes.md Outdated
Comment thread docs/api/rest-api/other/sql-endpoints.md Outdated
andreyorst and others added 3 commits April 29, 2026 12:43
The endpoint persists SQL text and identifying request metadata into
multiple stores (logs, audit, scheduler history, pg_stat_activity).
Make explicit that $psql is privileged-by-design — exposing it to
non-admin roles broadens access to logs and audit, not just to data.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andreyorst
andreyorst merged commit 485a1d9 into main Apr 29, 2026
2 checks passed
@andreyorst
andreyorst deleted the sql-console-improvements-v3 branch April 29, 2026 12:48
spicyfalafel added a commit that referenced this pull request May 26, 2026
aidbox-api 0.0.13's path-credentials endpoint requires the SP to
hold EXTERNAL_USE_LOCATION on the External Location covering the
staging path. Without it the module logs
:staging-s3-cleanup-skipped + :reason :no-external-use-location-grant
and skips Phase 0 cleanup — init-export still works, but stale
Parquet/_delta_log files accumulate across re-runs.

- Privilege tables (managed-zerobus + managed-sql) gain the row.
- CLI snippets add EXTERNAL_USE_LOCATION to the external-location
  grant.
- New troubleshooting entry #11 with both `databricks grants update`
  and SQL forms + a verify-via-SHOW-GRANTS hint.
- Cross-reference from item 10 (DELTA_CREATE_TABLE_SCHEME_MISMATCH)
  so operators who hit the column-drift symptom find the grant fix.
spicyfalafel added a commit that referenced this pull request May 26, 2026
…xport

Two parts:

1. **Strip "Phase 0/N" jargon** from the data-lakehouse tutorial. Phase
   numbers are an internal codebase organisation detail (managed-
   initial-export!'s body is structured as Phase 0..5) and mean
   nothing to a reader. Rephrase three places:
   - EXTERNAL_USE_LOCATION privilege rows (managed-zerobus + managed-
     sql tabs) — describe what the grant lets the module do, not which
     phase calls it.
   - Troubleshooting #10 (DELTA_CREATE_TABLE_SCHEME_MISMATCH) — refer
     to "auto-cleanup" instead of "Phase 0 auto-cleanup".
   - Troubleshooting #11 (staging-s3-cleanup-skipped log) — same.

2. **Document the same S3-staging-cleanup behaviour in
   $viewdefinition-export reference.** The $vd-export code path uses
   the identical `ensure-staging-table!` machinery (S3 files outlive
   UC `DROP TABLE`; cleanup runs at the start of the next call), but
   the reference said nothing about it. Add a "Staging cleanup on
   S3" subsection inside "How it works (kind=data-lakehouse)"
   covering the two practical consequences for typical cron-driven
   use: prefix rotation defeats auto-cleanup, and the
   `EXTERNAL_USE_LOCATION` grant is what enables it. Link out to
   the data-lakehouse tutorial's setup for the grant table itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
spicyfalafel added a commit that referenced this pull request May 27, 2026
- viewdefinition-export: drop the cancelUrl spec-compliance bullet —
  cancellation behaviour is already covered in the Cancellation section
  and the missing kick-off field is internal noise.
- data-lakehouse tutorial #11: replace inline-backtick SQL with fenced
  ```sql blocks so the inner backticks around <name> / <sp-id> render
  correctly.
- data-lakehouse tutorial parameters: rename heading to plural, replace
  the <details>Advanced parameters</details> collapsibles with a
  **Not required:** table mirroring the Required: section in both tabs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants