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

# ExportRecordsToFilesRequest

> ExportRecordsToFilesRequest — 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#L12797-L12811)&#x20;

<pre>`pub struct ExportRecordsToFilesRequest {    pub table_name: String,    pub filepath: String,    pub options: HashMap<String, String>,}`</pre>

The request payload for the `/export/records/tofiles` endpoint.Export records from table

Fields
`table_name: String`

The name of the table whose records are to be exported.

`filepath: String`

Path to data export target. If `filepath` has a file extension, it is read as the name of a file. If `filepath` is a directory, then the source table name with a random UUID appended will be used as the name of each exported file, all written to that directory. If filepath is a filename, then all exported files will have a random UUID appended to the given name. In either case, the target directory specified or implied must exist. The names of all exported files are returned in the response.

`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#L12796)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L12796)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.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#L12796)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L12796)
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#L12796)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L12796)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.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#L12796)
impl\<'de> [Deserialize](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html)\<'de> for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

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

#### 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#L12813-L12825)
impl [KineticaRecord](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md) for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L12814-L12816)
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#L12818-L12824)
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#L12796)
impl [Serialize](https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html) for [ExportRecordsToFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ExportRecordsToFilesRequest.md)

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

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