From lancedb
Guides writing, reviewing, and debugging LanceDB pipelines in Python or TypeScript, ensuring portability between local OSS and remote Enterprise/Cloud tables. Covers idiomatic queries, performance defaults, and remote server connections.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lancedb:lancedbThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to produce LanceDB pipelines that are portable between local and remote tables (for LanceDB Enterprise/Cloud) and idiomatic for the selected SDK.
agents/openai.yamlassets/icon.pngreferences/branch_ops.mdreferences/column_metadata.mdreferences/python/api_reference.mdreferences/python/patterns.mdreferences/python/performance.mdreferences/remote_connect.mdreferences/remote_jobs.mdreferences/typescript/api_reference.mdreferences/typescript/patterns.mdreferences/typescript/performance.mdscripts/check_materialization.pyUse this skill to produce LanceDB pipelines that are portable between local and remote tables (for LanceDB Enterprise/Cloud) and idiomatic for the selected SDK.
LanceDB has two common execution modes:
db://... URI. The data may be very large, commonly backed by object storage, and queried through a remote service.Do NOT assume local-only table helpers exist on remote tables. If the user asks for LanceDB Enterprise, Cloud, db://..., production remote access, or a remote table, focus on the remote table path: use search() / query(), keep reads bounded with select() and limit(), and avoid table-level full materialization APIs.
references/python/patterns.mdreferences/python/api_reference.mdreferences/python/performance.mdreferences/typescript/patterns.mdreferences/typescript/api_reference.mdreferences/typescript/performance.mdreferences/column_metadata.mdreferences/branch_ops.mdreferences/remote_connect.mdreferences/remote_jobs.mdpatterns.md for the selected SDK. Read api_reference.md when choosing method names or return collectors. Read performance.md when the task involves ingestion, indexing, filtering, query tuning, diagnostics, or large datasets. Read column_metadata.md when the task is documenting, tagging, classifying, or grouping table columns (field descriptions, lancedb:tag:* tags, logical column families). Read branch_ops.md when the task involves branch lifecycle (list/create/delete), writing to a non-main branch, or verifying a change stayed off main. Read remote_connect.md when the task involves jobs or direct REST access to an Enterprise deployment, and remote_jobs.md for the job REST methods themselves (list, describe, cancel, query_events).search() or query() builders with explicit select() and limit() for reads.table.optimize(). Do not call it for Enterprise/Cloud; remote maintenance is automatic.mode="overwrite" the same table name — see "Enterprise: never drop-then-reuse the same table name" below. This is the main local-vs-remote write pitfall.scripts/check_materialization.py on the relevant paths and inspect each finding before editing.Do not write code that assumes a local table API will exist on a remote table. Remote tables can be very large, so whole-table materialization helpers are intentionally unavailable or unsafe.
This does not mean result conversion is forbidden. Bounded query/search result collection is normal:
table.search(...).select([...]).limit(10).to_pandas()await table.search(...).select([...]).limit(10).toArray()The unsafe pattern is table-level or unbounded collection, plus local-only dataset escape hatches in remote code:
table.to_pandas(), table.to_arrow(), table.to_polars(); table.to_lance() is local/OSS-only dataset access, not materializationawait table.toArrow(), await table.query().toArray() without limit()LanceDB Enterprise/Cloud splits a control plane (DDL: create/drop/rename) from a data plane (query nodes that serve reads). Query nodes cache the resolved dataset for a table name for up to table_cache_ttl — default 300 seconds (5 minutes). After you drop or overwrite a table, the control plane updates immediately but the data plane keeps serving the old dataset until that cache entry expires. During the window the two planes disagree.
The failure this causes: you drop_table("t") then immediately create_table("t", ...) (or create_table("t", ..., mode="overwrite")). The DDL returns success, but every query against t returns 500 Internal Server Error (the query node resolves the stale/deleted dataset), and a fresh describe may still show the old schema/version. It looks like your write silently failed; it didn't — the name is cached.
mode="overwrite" has the same problem — it is a drop+create of the same name under the hood.
Rules for portable Enterprise ingestion:
mode="overwrite" to replace an existing Enterprise table in place.<table>_v2, or a run-stamped suffix). A brand-new name has no cached data-plane entry, so writes and reads work immediately.list_tables() and fail loudly if the name already exists rather than overwriting — prompt for a new name.rename_table(fresh_name, final_name). Renaming onto a name whose old dataset is still cached hits the same race, so the wait is mandatory. rename_table is a supported control-plane op.t was dropped; run the rename in ~5 minutes").This is Enterprise/Cloud-specific. Local/OSS tables have no separate data plane, so mode="overwrite" and immediate same-name reuse are fine there.
LanceDB Enterprise/Cloud deployments are served by a server implementing the lance-namespace OpenAPI spec (https://github.com/lance-format/lance-namespace/blob/main/docs/src/spec.yaml). Every remote (db://...) connection talks to such a server, and some operations exist only there. In particular, all operations around jobs (listing, inspecting, creating, or canceling jobs) run server-side — there is no local/OSS equivalent. Before any job work, or any direct REST call to an Enterprise deployment, read references/remote_connect.md to resolve the base URL, credentials, and database header and to validate the connection. Then use the four job REST methods documented in references/remote_jobs.md (list, describe, cancel, query_events).
Run the scanner when reviewing or modifying an existing codebase:
python skills/lancedb/scripts/check_materialization.py path/to/file_or_dir
The script reports likely unsafe full-table materialization in Python and TypeScript. Treat results as review prompts, not automatic proof of a bug.
npx claudepluginhub lancedb/lancedb --plugin lancedbReference for Lance v9 columnar lakehouse format for multimodal AI. Covers Rust crate workspace, file/table/index formats, schema evolution, vector indexes, and more.
Explores Bauplan lakehouse data using Python SDK: inspect namespaces, tables, schemas, samples, profiling queries; export results to files. Read-only, phased execution produces summary.md.
Manages Databricks Lakebase Postgres: creates autoscaling projects, branching, compute scaling, PostgreSQL connectivity, Data API, and synced tables. For Lakebase databases, OLTP storage, or app connections to Databricks Postgres.