`describe_table` should describe tables outside the data source in Python

Open
#471 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with _describe_table_text() on the Python side, which currently raises when a table is missing from source.table_ids, and read the R change in #470 to see the intended behavior. The new cases belong in tests/shared/describe-table.json so both suites check the same results. Done means tables outside the data source are described with a no-documentation note, trusted-only mode still refuses them, and alternate names like main.sales resolve to the table's label.

Written by the indexing model from the issue text.

Description

py

Same thing as #469, but for the Python side.

In the R package, #470 lets describe_table describe any table the connection can query, not just the data source's tables, so it agrees with run_sql. Python's _describe_table_text() still raises when a table isn't in source.table_ids, so the agent can query a table it found with run_sql but can't describe it.

To match R:

  • Describe tables outside the data source, with a note that no documentation covers them. On Snowflake and Databricks, run the usual access check first.
  • Keep refusing them in trusted-only mode.
  • Resolve alternate names for data source tables (main.sales for sales) to the table's label, so its documentation still shows.

Pin these in tests/shared/describe-table.json so both suites test the same behavior.

Dominant language
Python
Stars
69
Forks
5
Avg merge
5d 3h
Merged PRs (30d)
33

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/commons

All issues in posit-dev/commons

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.