lance-format / lance-format/lance-data-viewer

Support opening a single .lance dataset URI

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
60
Forks
9
Avg merge
10m
Merged PRs (30d)
4

Description

Summary

The opt-in location flow added by #84 accepts a LanceDB database root and then lists the tables beneath it. It does not open a URI that points directly at one .lance dataset.

For example, this works as a database location:

s3://bucket/path
└── table.lance

But entering the direct dataset URI below connects at the wrong level and produces an empty table list:

s3://bucket/path/table.lance

PR #71 supported the direct form through a separate pylance API, but that branch was superseded by the current connection flow.

Proposed approach

Extend the existing opt-in location flow instead of adding another API surface:

  • Detect when the supplied location identifies a single .lance dataset.
  • Split it into the parent LanceDB location and table name.
  • Open it with the existing lancedb.connect(parent) and table-opening code.
  • Return the identified table as the single /datasets result.
  • Reuse the existing metadata, rows, serialization, error handling, and main/version/tag/branch reference support.
  • Do not add a direct pylance dependency or separate /dataset/* endpoints.
  • Keep the location field opt-in through the existing DATA_PATH= configuration.

Tests

  • Local direct .lance path.
  • Object-store URI parsing without rewriting the scheme.
  • Database-root behavior remains unchanged.
  • Invalid and nonexistent direct locations.
  • Full supported LanceDB version matrix.

An object-store integration smoke test against MinIO for the canonical image would be useful if it can remain lightweight.

Related: #12, #71, #84.

Contributor guide

Open the contributing guide

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.

Research direction

Trace the existing opt-in DATA_PATH location flow, including lancedb.connect and the /datasets result handling. Start with the current database-root behavior, then run or add coverage for local direct .lance paths, object-store URI parsing, invalid and nonexistent locations, unchanged database roots, and the supported LanceDB version matrix; done means a direct dataset returns one table with existing metadata, rows, serialization, errors, and reference support.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.