Skip to content

add method to print/iterate through available duckdb/sqlite tables #285

@gregorywaynepower

Description

@gregorywaynepower

Prework

Proposal

Describe the new feature clearly and concisely. If applicable, write a minimal example in Python or in pseudo-code to show input, usage, and desired output

To help us read any code you include (optional) please try to follow the Style Guide for Python Code.

I'd enjoy a method to that would print or iterate through the tables available in the database under the default schema. The only issues that I see are that Ibis doesn't use the same style of URI that pointblank does.

import ibis
from pathlib import Path

ibis.options.interactive = True

def print_available_tables():
    path_to_database = "Path_object_or_path_to_database_here"
    conn = ibis.duckdb.connect(path_to_database)
    return conn.list_tables()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions