> ## 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.

# InsertRecordsFromFilesRequest

> InsertRecordsFromFilesRequest — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[generated](https://docs.kinetica.com/content/api/rust/generated/index.md)::<wbr />[api](https://docs.kinetica.com/content/api/rust/generated/api/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16615-L16654)&#x20;

<pre>`pub struct InsertRecordsFromFilesRequest {    pub table_name: String,    pub filepaths: Vec<String>,    pub modify_columns: HashMap<String, HashMap<String, String>>,    pub create_table_options: HashMap<String, String>,    pub options: HashMap<String, String>,}`</pre>

The request payload for the `/insert/records/fromfiles` endpoint.Insert records from one or more files into the specified target table

Fields
`table_name: String`

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 file, and the new table name will have to meet standard table naming criteria.

`filepaths: Vec<String>`

A list of file paths from which data will be sourced;For paths in KiFS, use the URI prefix of kifs\:// followed by the path to a file or directory. File matching by prefix is supported, e.g. kifs\://dir/file would match dir/file\_1 and dir/file\_2. When prefix matching is used, the path must start with a full, valid KiFS directory name.If an external data source is specified in datasource\_name, these file paths must resolve to accessible files at that data source location. Prefix matching is supported. If the data source is hdfs, prefixes must be aligned with directories, i.e. partial file names will not match.If no data source is specified, the files are assumed to be local to the database and must all be accessible to the gpudb user, residing on the path (or relative to the path) specified by the external files directory in the Kinetica configuration file. Wildcards (\*) can be used to specify a group of files. Prefix matching is supported, the prefixes must be aligned with directories.If the first path ends in .tsv, the text delimiter will be defaulted to a tab character. If the first path ends in .psv, the text delimiter will be defaulted to a pipe character (|).

`modify_columns: HashMap<String, HashMap<String, String>>`

Not implemented yet.

`create_table_options: HashMap<String, String>`

Options from `/create/table`, allowing the structure of the table to be defined independently of the data source, when creating the target table

`options: HashMap<String, String>`

Optional parameters.

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
impl\<'de> [Deserialize](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html)\<'de> for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)

#### fn [deserialize](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html#tymethod.deserialize)\<\_\_D>(\_\_deserializer: \_\_D) ->[Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<Self, \_\_D::[Error](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserializer.html#associatedtype.Error)>&#xA;where \_\_D: [Deserializer](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserializer.html)\<'de>,

Deserialize this value from the given Serde deserializer. [Read more](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html#tymethod.deserialize)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16656-L16673)
impl [KineticaRecord](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md) for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16657-L16659)
fn [avro\_schema](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md#tymethod.avro_schema)(\&self) -> &'static [str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)

Returns the Avro schema as a JSON string for this record type.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16661-L16672)
fn [type\_properties](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md#tymethod.type_properties)() -> [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), [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>>

Returns type properties including field types and attributes (e.g., primary\_key).

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/lib.rs#L325-L327)
fn [use\_compression](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md#method.use_compression)() -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Whether requests of this type are Snappy-compressed when the client has [`KineticaOptions::use_snappy`](https://docs.kinetica.com/content/api/rust/gpudb/struct.KineticaOptions#structfield.use_snappy) enabled. [Read more](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md#method.use_compression)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)
impl [Serialize](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html) for [InsertRecordsFromFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.InsertRecordsFromFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L16614)

#### fn [serialize](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html#tymethod.serialize)\<\_\_S>(\&self, \_\_serializer: \_\_S) ->[Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<\_\_S::[Ok](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serializer.html#associatedtype.Ok), \_\_S::[Error](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serializer.html#associatedtype.Error)>&#xA;where \_\_S: [Serializer](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serializer.html),

Serialize this value into the given Serde serializer. [Read more](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html#tymethod.serialize)


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