Bulk import
Upload Parquet files for bulk import into existing tables and list the status of bulk import jobs.
Bulk import endpoints require the upgraded storage engine, enabled with the --use-pacha-tree flag, and a compactor node that runs the bulk import scheduler to complete the import. All endpoints require an admin (operator) token.
/api/v3/enterprise/importList bulk import statuses
Lists the status of bulk import jobs, for both uploads and object-store pulls.
Requires a token with the describe action on at least one database, or an admin token. The list includes only jobs for databases the token can describe. A token that can’t describe any database gets 403.
Requires the upgraded storage engine (enabled with the --use-pacha-tree flag).
This endpoint is only available in InfluxDB 3 Enterprise.
curl --request GET \
"https://localhost:8181/api/v3/enterprise/import" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
data
objecterror
stringdata
objecterror
stringdata
objecterror
string/api/v3/enterprise/importImport Parquet data
Imports Parquet data into an existing table. Send the data one of two ways:
- Upload (
multipart/form-data): send one Parquet file in the request. - Object-store pull (
application/json): name asourceprefix, and the server imports every Parquet file under it. The source is either a prefix in the cluster’s own object store or ans3://bucket/prefixURL. The server reads another bucket with its own object-store credentials; the request carries none, so those credentials must be able to read the bucket. A server whose own object store isn’t S3 can’t read another bucket and returns400.
The request returns after the import is staged. The compactor node imports the data asynchronously. A job
moves through queued, imported, and compacted; rows become queryable once the job is compacted.
Use List bulk import statuses to follow it.
Column types
For generic Parquet files, a column that isn’t in column_metadata is imported as a field, typed from its
Parquet type. This applies even when the target table already declares the column as a tag, so map every
string tag column (for example, {"column_mapping": {"host": "tag"}}). Otherwise the import fails with
invalid column type for column 'host', expected iox::column_type::tag, got iox::column_type::field::string.
A string column with no mapping can also fail with 400 Unable to infer data type for column.
Explicit schema databases
In a database created with schema_mode: explicit, every column in the file must already be declared on the
table. Otherwise the import is rejected and no job is created. Declare columns with
PATCH /api/v3/configure/table.
Permissions
Requires a token with the write action on the target database (for example, db:DATABASE_NAME:write), or an
admin token. For a token without that permission, including when the database doesn’t exist, the request
returns 403.
Requires the upgraded storage engine (enabled with the --use-pacha-tree flag); the compactor node runs the
bulk import scheduler that completes the import.
This endpoint is only available in InfluxDB 3 Enterprise.
Request body required
application/jsoncolumn_metadata
object{"column_mapping":{"room":"tag","temp":"f64","time":"time"}}column_mapping
required
objectcolumn_mapping, schema, and column_metadata.database
required
stringsource
required
stringstaging/exports/), or an s3://bucket/prefix URL. Every Parquet file under the prefix is imported.table
required
stringcurl --request POST \
"https://localhost:8181/api/v3/enterprise/import" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"column_metadata": {
"column_mapping": {
"room": "tag",
"temp": "f64",
"time": "time"
}
},
"database": "DATABASE",
"source": "SOURCE",
"table": "TABLE"
}'Responses
column_metadata
object{"column_mapping":{"room":"tag","temp":"f64","time":"time"}}column_mapping
required
objectcolumn_mapping, schema, and column_metadata.completed_at
integer <int64>created_at
required
integer <int64>db_id
required
integerfilename
required
stringiox_parquet
required
booleanlast_message
stringlast_updated_at
integer <int64>max_timestamp_ns
required
integer <int64>0 when the file has no statistics the server can read; the imported data isn’t affected.min_timestamp_ns
required
integer <int64>0 when the file has no statistics the server can read; the imported data isn’t affected.row_count
required
integer <int64>size_bytes
required
integer <int64>started_at
integer <int64>status
required
stringqueued, imported, and compacted; its rows become queryable once it’s compacted, not when it’s imported.queued
, dispatched
, imported
, compacted
, failed
, terminal_failedtable_id
required
integerupload_uuid
required
stringfile_bytes, database, or table; unparseable multipart; invalid or empty Parquet; malformed column_metadata; column type or mapping mismatch; or a missing time column.data
objecterror
stringdata
objecterror
stringwrite action on the target database. A token without that permission also gets 403 when the database doesn’t exist (Not authorized to import into database).data
objecterror
stringcpu does not exist”).data
objecterror
string500 with Could not modify catalog: a column that an explicit schema database doesn’t declare, or an unmapped string column that the table declares as a tag.data
objecterror
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB 3 Enterprise and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support. Customers using a trial license can email trial@influxdata.com for assistance.