Skip to content

本页尚未翻译

本页内容仍为英文原文,源自官方文档 basics/naming。中文翻译正在分批进行中。

Naming rules ​

Choose portable names for your data objects and namespace paths.

Naming rules ​

Databases, namespaces, tables and views all have names. Choose names that describe their purpose, such as documents, prod or training_2026. Consistent names make data easier to find and application code easier to read.

Use the following rules for names that work across LanceDB Embedded and LanceDB Enterprise.

ObjectCharactersLength
Table, materialized view, viewASCII letters and digits, -, _, .1 to 128 characters
Namespace componentASCII letters and digits, -, _, .1 to 64 characters; at most 10 components in a path
DatabaseASCII letters and digits, -, _, ., with / between components1 to 64 characters for the whole name
SecretASCII letters and digits, -, _, .1 to 128 characters
FunctionASCII letters and digits, _1 to 128 characters
  • Names and individual namespace or database components must not be empty.
  • Table, view, namespace and database components cannot be . or ...
  • Secret names cannot be . or ...
  • Avoid $ and : because they separate parts of qualified identifiers.
  • A namespace path beginning with public cannot contain another component.

Namespace paths ​

A namespace path is a list of names. ["prod", "search"] identifies the search namespace within prod. A table named documents belongs to that namespace; its table name remains documents.

Use the SDK's namespace-path argument to supply the list. A period inside an SDK name is a character in that name, not a separator that creates another namespace. SQL uses its own qualified-name syntax; see SQL namespace paths.

The empty path [] identifies the root namespace.

Examples ​

Name or pathGuidance
documents, user-events.v2, train_2026Portable table names
["prod", "search"]A two-component namespace path
my tableUse my_table instead of a space
orders$2026Use orders_2026; $ is reserved
résumésUse an ASCII name such as resumes
["public", "search"]Invalid nesting under public; use a different parent namespace

Learn more ​

  • Namespaces: create namespaces and address tables.
  • Limits: check other constraints before designing your schema.