Package org.apache.arrow.adbc.core
Interface BulkIngestBuilder
- All Superinterfaces:
AutoCloseable
A fluent builder-style interface for configuring and executing a bulk ingest.
-
Method Summary
Modifier and TypeMethodDescriptionAppend to the target table; fail if not found.bind(ArrowReader stream) Ingest data from the given reader.bind(VectorSchemaRoot root) Ingest data from the given root.voidclose()Clean up any state in this bulk ingest.Create the target table if necessary, append if already exists.Create the target table; fail if already exists.default AdbcStatement.UpdateResultingest()Execute the bulk ingest.mode(BulkIngestMode mode) How to handle an already-existing/non-existent target table.option(IngestOption option) Set an arbitrary ingest option.Set a statement option before ingest.Drop (if exists) and create the target table.targetCatalog(String catalog) Ingest into a table in the given catalog.targetSchema(String schema) Ingest into a table in the given schema.targetTable(String table) Ingest into a table with the given name (required).default BulkIngestBuilderIngest into a temporary table.temporary(boolean isTemporary) Whether to ingest into a temporary table or not.Convert this builder to anAdbcStatement(low-level API for further control) without executing.
-
Method Details
-
createMode
Create the target table; fail if already exists.- Throws:
AdbcException
-
appendMode
Append to the target table; fail if not found.- Throws:
AdbcException
-
replaceMode
Drop (if exists) and create the target table.- Throws:
AdbcException
-
createAppendMode
Create the target table if necessary, append if already exists.- Throws:
AdbcException
-
mode
How to handle an already-existing/non-existent target table. Default isBulkIngestMode.CREATE.Also see the convenience methods
createMode(),appendMode(),replaceMode(), andcreateAppendMode().- Throws:
AdbcException
-
bind
Ingest data from the given root.Like
AdbcStatement.bind(VectorSchemaRoot), this ingest will NOT close the given root. If a different root or stream is bound, this root will simply be forgotten.- Throws:
AdbcException
-
bind
Ingest data from the given reader.Like
AdbcStatement.bind(ArrowReader), this ingest WILL close the given stream. If a different root or stream is bound, this stream will be closed.- Throws:
AdbcException
-
targetTable
Ingest into a table with the given name (required).- Throws:
AdbcException
-
targetSchema
Ingest into a table in the given schema.- Throws:
AdbcException
-
targetCatalog
Ingest into a table in the given catalog.- Throws:
AdbcException
-
temporary
Ingest into a temporary table.- Throws:
AdbcException
-
temporary
Whether to ingest into a temporary table or not.- Throws:
AdbcException
-
option
Set an arbitrary ingest option.- Throws:
AdbcException
-
option
Set a statement option before ingest.- Throws:
AdbcException
-
toStatement
Convert this builder to anAdbcStatement(low-level API for further control) without executing.The caller is responsible for closing the returned statement.
- Throws:
AdbcException
-
ingest
Execute the bulk ingest.This will consume the bound stream, if any. To ingest again, bind a new stream or root or update data in the already-bound root.
- Throws:
AdbcException
-
close
Clean up any state in this bulk ingest.- Specified by:
closein interfaceAutoCloseable- Throws:
AdbcException
-