mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
## Summary - **Define Storage Integration**: un-gates the Python (and Rust, for S3) `create_storage_integration` examples, drafted against #4618 and held back until it shipped -- it's now in v0.42.0-beta.0+, and the signature matches the drafts exactly. - **Naming rules**: drops the `Branch` row and its "Learn more" link, consistent with de-emphasizing branches elsewhere in this nav. - **Distributed RTE Write**: removes the REST path, the `__lance_mem_wal` index name, and "WAL node" terminology in favor of an abstract framing -- a query node routes writes to RTE nodes, each of which can host shards from many different tables. Both diagram variants are updated to match. - **Data Page Cache / Tiered Index Cache / Cache Prewarm**: drop Helm-specific and exact-percentage detail (disk-budget math, `startup_prewarm_block_query_ready`/`healthPort`/failure-policy table) in favor of a short feature → architecture → why-it-matters shape, each closing with a contact-sales pointer. Data Page Cache's on-demand prewarm section is removed outright. ## Note I wasn't able to get a clean visual render of the updated Distributed RTE Write diagram in local preview -- Mermaid isn't rendering in headless Chrome in this environment for *any* page right now, confirmed against an unmodified reference page showing the identical symptom. The diagram source follows the exact pattern already shipped and working in the 21 diagrams from the earlier brand-theming pass, and `mint validate`/`mint broken-links` both pass clean. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
---
|
|
title: "Import Datasets"
|
|
sidebarTitle: "Import Datasets"
|
|
description: "Create a table directly from a HuggingFace dataset or an existing Lance dataset in object storage, with one CREATE TABLE AS SELECT."
|
|
icon: file-import
|
|
keywords: ["import", "ctas", "create table as select", "huggingface", "s3", "gcs", "azure"]
|
|
availability:
|
|
embedded: unavailable
|
|
enterprise: available
|
|
---
|
|
|
|
A `CREATE TABLE ... AS SELECT` (CTAS) reads directly from a HuggingFace
|
|
dataset or an existing Lance dataset in object storage, once a
|
|
[storage integration](/ingestion/define-storage-integration) covers that
|
|
location -- the integration is never named in the statement, LanceDB
|
|
matches it by URI prefix.
|
|
|
|
## Import a HuggingFace dataset {#huggingface}
|
|
|
|
<CodeGroup>
|
|
```sql SQL icon="database"
|
|
CREATE TABLE imported AS
|
|
SELECT * FROM 'hf://datasets/owner/repo/data/train-*.parquet'
|
|
```
|
|
</CodeGroup>
|
|
|
|
See [Inspect Datasets](/curation/inspect-datasets#import) for
|
|
the full workflow, including querying a dataset directly without importing
|
|
it first.
|
|
|
|
## Import a Lance dataset from object storage {#object-storage}
|
|
|
|
<CodeGroup>
|
|
```sql SQL icon="database"
|
|
CREATE TABLE events_copy AS
|
|
SELECT * FROM 's3://customer-data/raw/events.lance'
|
|
```
|
|
</CodeGroup>
|
|
|
|
An `s3://`, `gs://` or `az://` prefix reads an existing **Lance** dataset
|
|
the same way as a managed table -- use this to copy a dataset another
|
|
process already wrote in Lance format, not an arbitrary file format. See
|
|
[Storage Integration](/sql/ddl/storage-integration#read-import) for GCS and
|
|
Azure examples.
|
|
|
|
## How the import runs {#distributed}
|
|
|
|
See [Distributed Write](/enterprise/distributed-write) for how an import's
|
|
writes divide across plan executors, and when a small import instead runs
|
|
as one local task.
|
|
|
|
<Note>
|
|
Importing requires a native database with `database_manifest_enabled`.
|
|
Combining a HuggingFace source with a WAL-backed destination table in one
|
|
CTAS is rejected, since the import cannot publish a base-only read that
|
|
omits the destination's unflushed data.
|
|
</Note>
|
|
|
|
## What to read next {#next}
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Define Storage Integration" icon="cloud" href="/ingestion/define-storage-integration">
|
|
Set up the credential an import reads through.
|
|
</Card>
|
|
<Card title="Inspect Datasets" icon="database" href="/curation/inspect-datasets">
|
|
Query and import HuggingFace or object-storage datasets in full.
|
|
</Card>
|
|
<Card title="Distributed Write" icon="arrows-split-up-and-left" href="/enterprise/distributed-write">
|
|
How an import's writes divide across plan executors.
|
|
</Card>
|
|
<Card title="Storage Integration" icon="cloud" href="/sql/ddl/storage-integration">
|
|
The complete SQL reference for every provider.
|
|
</Card>
|
|
</CardGroup>
|