URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/insert/records/json
Overview
Kinetica provides a direct JSON ingest service to allow raw JSON to be translated into records and inserted into the database.
If the target table exists, inserted records will be appended to it.
If the target table does not exist, it will be created automatically, with type inferencing used to determine column types & sizes, before inserting data.
Either a single JSON object or multiple JSON objects (as an array) can be ingested at once:
|
|
|
|
Usage
The base JSON ingest endpoint URL is:
http://<db.host>:9191/insert/records/json
The JSON payload should be passed as data in the request.
Authentication credentials should be passed with the request, as well.
Endpoint-specific options can be passed as request parameters. See /insert/records/frompayload under the option parameter for a complete list of supported options.
Note
Both columns_to_load & columns_to_skip can only used named columns, not column positions, as JSON maps don't lend themselves to positional references.
Examples
Below are templates of ingesting a JSON file of product data into a table, via the /insert/records/json REST endpoint:
|
|
|
|
Endpoint-specific options can be passed as request parameters:
|
|
|
|
Data can also be in-lined with the command:
|
|
|
|