Skip to content

Refine %catalog context resolution and path handling - #60

Merged
oskaresparza merged 2 commits into
stagingfrom
development
Sep 18, 2026
Merged

oskaresparza merged 2 commits into
stagingfrom
development

Conversation

@oskaresparza

Copy link
Copy Markdown
Collaborator

Summary

Brings staging up to date with development — two merged PRs:

  • Refine %catalog context resolution: strict use(), optional list() path #57use() now only accepts a whole, absolute path and never resolves it against the existing context; list()'s own path is now optional (lists the current context itself); every other single-path verb's bare path stays absolute when it already starts with catalog (this deployment's one real root source).
  • Allow relative paths on more verbs, cascade real deletes, refine context defaults #59create_folder/data_copy/data_move/set_wiki/delete_wiki/get_wiki/set_tags/delete_tags/get_tags/delete_table/create_view/delete_view now all accept either an absolute path or one relative to the current context; delete_folder's cascade=True now really deletes tables/views underneath (via SQL DROP, not the untrusted generic catalog-REST delete); set_wiki ignores tags on a table/view; CatalogSession now starts with context at the catalog root instead of None; use(None)/use("") reset to that root instead of clearing to no context.

Test plan

  • pytest — 371 passed
  • ruff check / ruff format --check — clean on touched files

🤖 Generated with Claude Code

oskaresparza and others added 2 commits September 18, 2026 14:02
…ext defaults

create_folder/data_copy/data_move/set_wiki/delete_wiki/get_wiki/set_tags/
delete_tags/get_tags/delete_table/create_view/delete_view now all accept
either an absolute path or one relative to the current context, matching
use()'s own resolution rules — previously most of them only took absolute
paths, which broke on Dremio's Arctic-backed source (a 400, not 404, on a
by-path lookup into a not-yet-existing nested item) once a custodian tried
a bare create_folder call.

delete_folder's cascade=True now actually deletes tables/views underneath
too, via the same SQL DROP TABLE/VIEW delete_table/delete_view already use,
instead of the generic catalog-REST delete (which Dremio doesn't seem to
trust with real data). set_wiki ignores its tags parameter when path is a
table/view, since those have native tags instead of the wiki "Meta Data"
convention meant for folders.

CatalogSession now starts with context at the catalog root ("catalog")
instead of None, so a custodian's first relative call already has
something to resolve against. use(None)/use("") reset context back to
that same root rather than clearing it to no context at all (that's what
set_context(None) is still for — the lower-level primitive, not normally
called directly). use() also prints "context set to <path>" itself now,
since it never queues anything for the usual commit-report auto-print to
show.

Updated %catalog help, README, the design doc, and both example notebooks
to match throughout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Allow relative paths on more verbs, cascade real deletes, refine context defaults
@oskaresparza
oskaresparza merged commit 189940e into staging Sep 18, 2026
9 checks passed
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.

1 participant