Files
lancedb/docs/src/js/interfaces/AddDataOptions.md
T
ningsh7 ef11e44adc feat(node): expose allowExternalBlobOutsideBases in Table.add (#4317)
## Summary

- Add `allowExternalBlobOutsideBases` to the Node `AddDataOptions` and
forward it through N-API to the Rust `AddDataBuilder`.
- Document its default and local-only external blob behavior.
- Cover URI strings and URI objects, option scoping, progress callbacks,
overwrite mode, and remote rejection.

## Validation

- `pnpm test --runInBand` (21 suites passed, 1 skipped; 908 tests
passed, 6 skipped)
- `pnpm lint-ci`
- `pnpm tsc`
- `pnpm run docs`
- `cargo fmt --all -- --check`
- `CC=clang cargo clippy --profile ci -p lancedb-nodejs --all-features
-- -D warnings`

Fixes #4267
2026-09-28 20:19:36 -05:00

1.6 KiB

@lancedb/lancedb • Docs


@lancedb/lancedb / AddDataOptions

Interface: AddDataOptions

Options for adding data to a table.

Properties

allowExternalBlobOutsideBases?

optional allowExternalBlobOutsideBases: boolean;

Whether blob URIs outside registered external bases may be written.

Defaults to false. This option is supported only for local/native tables; remote tables return an error when it is enabled. An enabled write stores the absolute URI reference without registering a base or copying the external object into the database. The object must remain accessible when the blob is read later.


mode

mode: "append" | "overwrite";

If "append" (the default) then the new data will be added to the table

If "overwrite" then the new data will replace the existing data in the table.


progress()

progress: (progress) => void;

Optional callback invoked periodically with write progress.

The callback is fired once per batch written and once more with done: true when the write completes. Calls are dispatched asynchronously to the JS event loop and never block the write — a slow callback will queue events rather than back-pressure the writer.

Errors thrown from the callback are logged with console.warn and swallowed — they do not abort the write.

Parameters

Returns

void

Example

await table.add(data, {
  progress: (p) => {
    console.log(`${p.outputRows}/${p.totalRows ?? "?"} rows`);
  },
});