mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-23 15:00:39 +00:00
### Summary
- Add an optional `progress` callback to `Table.add(data, { progress
})`. Callback fires once per batch written and once more with `done:
true` when the write completes.
- Errors thrown from the user's callback are logged with `console.warn`
and swallowed
### Testing
- npm test
- ran smoke test script to verify functionality
1.1 KiB
1.1 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / WriteProgress
Interface: WriteProgress
Progress snapshot for a write operation, delivered to the progress
callback passed to Table.add.
Properties
activeTasks
activeTasks: number;
Number of parallel write tasks currently in flight.
done
done: boolean;
true for the final callback; false otherwise.
elapsedSeconds
elapsedSeconds: number;
Wall-clock seconds since the write started.
outputBytes
outputBytes: number;
Number of bytes written so far.
outputRows
outputRows: number;
Number of rows written so far.
totalRows?
optional totalRows: number;
Total rows expected, when the input source reports it.
Always set on the final callback (the one with done: true), falling
back to the actual number of rows written when the source could not
report a row count up front.
totalTasks
totalTasks: number;
Total number of parallel write tasks (the write parallelism).