Skip to content

feat: add convenience API for bulk ingest#4116

Merged
lidavidm merged 1 commit intoapache:mainfrom
kentkwu:gh-4100
Mar 18, 2026
Merged

feat: add convenience API for bulk ingest#4116
lidavidm merged 1 commit intoapache:mainfrom
kentkwu:gh-4100

Conversation

@kentkwu
Copy link
Copy Markdown
Contributor

@kentkwu kentkwu commented Mar 18, 2026

This PR adds a higher-level API for bulk ingest on AdbcConnection, wrapping the low-level statement option + bind + execute_update pattern.

await conn.ingest('my_table', data)
await conn.ingest('my_table', data, { mode: IngestMode.Append })
await conn.ingest('my_table', data, { mode: IngestMode.Replace, dbSchema: 'public' })

Also fixes the underlying bind() implementation to use AdbcStatementBindStream instead of AdbcStatementBind, removing the previous single-batch limitation. bind() now accepts Tables with any number of batches.

Changes

  • AdbcConnection.ingest(tableName, data, options?) convenience method
  • IngestMode and IngestOptions exported types
  • AdbcStatement.bind() now accepts Table only (was RecordBatch | Table)
  • AdbcStatement.bind() upgraded to use AdbcStatementBindStream in the Rust layer, removing the single-batch limitation

Test Plan

npm test

closes #4100

@lidavidm lidavidm merged commit 4096719 into apache:main Mar 18, 2026
12 of 13 checks passed
@lidavidm lidavidm added this to the ADBC Libraries 23 milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

javascript: add convenience API for bulk ingest

2 participants