Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Eventual Inc Daft Session List Tables

From Leeroopedia
Revision as of 14:53, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Eventual_Inc_Daft_Session_List_Tables.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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