Implementation:Eventual Inc Daft Session List Tables
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Data_Engineering, Catalog_Management |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
Concrete tool for listing available tables in the current session context provided by the Daft library.
Description
The list_tables method on Session returns a list of Identifier objects representing available tables. It delegates to the Rust PySession.list_tables and wraps the returned identifiers. An optional pattern parameter supports catalog-specific filtering syntax.
Usage
Call sess.list_tables() on a Session instance. Use for data discovery, catalog exploration, and verifying table existence.
Code Reference
Source Location
- Repository: Daft
- File:
daft/session.py - Lines: L535-551
Signature
def list_tables(self, pattern: str | None = None) -> list[Identifier]
Import
from daft.session import Session
sess = Session()
tables = sess.list_tables()
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| pattern | None | No | SQL LIKE pattern for filtering table names. Syntax is catalog-dependent. None returns all tables. |
Outputs
| Name | Type | Description |
|---|---|---|
| return | list[Identifier] | A list of Identifier objects representing available tables matching the pattern. |
Usage Examples
Basic Usage
from daft.session import Session
import daft
sess = Session()
sess.create_temp_table("users", daft.from_pydict({"id": [1, 2]}))
sess.create_temp_table("orders", daft.from_pydict({"id": [10, 20]}))
# List all tables
tables = sess.list_tables()
# [Identifier('users'), Identifier('orders')]
# Filter with a pattern (native catalog)
tables = sess.list_tables("user%")
# [Identifier('users')]
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment