> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# insert_records_from_payload

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/insert_records_from_payload.rs#L34-L54)
pub async fn [insert\_records\_from\_payload](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/insert-records-from-payload.md#method.insert_records_from_payload)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), data\_text: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), data\_bytes: [ByteBuf](https://docs.kinetica.com/content/api/rust/struct.ByteBuf.md), modify\_columns: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>>, create\_table\_options: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[InsertRecordsFromPayloadResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Insert records from a text-based or binary payload into the specified target tableReads from the given text-based or binary payload and inserts the data into a new or existing table. The table will be created if it doesn’t already exist.Returns once all records are processed.

##### Arguments

<ul>
  <li>`table_name` - Name of the table into which the data will be inserted, in \[schema\_name.]table\_name format, using standard name resolution rules. If the table does not exist, the table will be created using either an existing type\_id or the type inferred from the payload, and the new table name will have to meet standard table naming criteria.</li>
  <li>`data_text` - Records formatted as delimited text.</li>
  <li>`data_bytes` - Records formatted as binary data.</li>
  <li>`modify_columns` - Not implemented yet.</li>
  <li>`create_table_options` - Options used when creating the target table. Includes type to use. The other options match those in `/create/table`.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/insert_records_from_payload.rs#L80-L107)
pub async fn [insert\_records\_from\_payload\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/insert-records-from-payload.md#method.insert_records_from_payload_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), data\_text: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), data\_bytes: [ByteBuf](https://docs.kinetica.com/content/api/rust/struct.ByteBuf.md), modify\_columns: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>>, create\_table\_options: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, options: [InsertRecordsFromPayloadRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[InsertRecordsFromPayloadResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Insert records from a text-based or binary payload into the specified target tableReads from the given text-based or binary payload and inserts the data into a new or existing table. The table will be created if it doesn’t already exist.Returns once all records are processed.

##### Arguments

<ul>
  <li>`table_name` - Name of the table into which the data will be inserted, in \[schema\_name.]table\_name format, using standard name resolution rules. If the table does not exist, the table will be created using either an existing type\_id or the type inferred from the payload, and the new table name will have to meet standard table naming criteria.</li>
  <li>`data_text` - Records formatted as delimited text.</li>
  <li>`data_bytes` - Records formatted as binary data.</li>
  <li>`modify_columns` - Not implemented yet.</li>
  <li>`create_table_options` - Options used when creating the target table. Includes type to use. The other options match those in `/create/table`.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/insert_records_from_payload.rs#L110-L121)
pub async fn [insert\_records\_from\_payload\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/insert-records-from-payload.md#method.insert_records_from_payload_raw)( \&self, request: &[InsertRecordsFromPayloadRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[InsertRecordsFromPayloadResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`InsertRecordsFromPayloadRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadRequest) to the `/insert/records/frompayload` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/insert_records_from_payload.rs#L125-L137)
pub async fn [insert\_records\_from\_payload\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/insert-records-from-payload.md#method.insert_records_from_payload_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[InsertRecordsFromPayloadRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[InsertRecordsFromPayloadResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`InsertRecordsFromPayloadRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromPayloadRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.