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

# create_table_external

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_table_external.rs#L55-L73)
pub async fn [create\_table\_external](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-table-external.md#method.create_table_external)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), filepaths: [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)>, 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)\<[CreateTableExternalResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Create a new external tableCreates a new external table, which is a local database object whose source data is located externally to the database. The source data can be located either in KiFS; on the cluster, accessible to the database; or remotely, accessible via a pre-defined external data source.The external table can have its structure defined explicitly, via `create_table_options`, which contains many of the options from `/create/table`; or defined implicitly, inferred from the source data.

##### Arguments

<ul>
  <li>
    `table_name` - Name of the table to be created, in \[schema\_name.]table\_name format, using standard name resolution rules and meeting table naming criteria.
  </li>

  <li>
    `filepaths` - 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 (|).
  </li>

  <li>
    `modify_columns` - Not implemented yet.
  </li>

  <li>
    `create_table_options` - Options from `/create/table`, allowing the structure of the table to be defined independently of the data source
  </li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_table_external.rs#L120-L145)
pub async fn [create\_table\_external\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-table-external.md#method.create_table_external_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), filepaths: [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)>, 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: [CreateTableExternalRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTableExternalResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Create a new external tableCreates a new external table, which is a local database object whose source data is located externally to the database. The source data can be located either in KiFS; on the cluster, accessible to the database; or remotely, accessible via a pre-defined external data source.The external table can have its structure defined explicitly, via `create_table_options`, which contains many of the options from `/create/table`; or defined implicitly, inferred from the source data.

##### Arguments

<ul>
  <li>
    `table_name` - Name of the table to be created, in \[schema\_name.]table\_name format, using standard name resolution rules and meeting table naming criteria.
  </li>

  <li>
    `filepaths` - 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 (|).
  </li>

  <li>
    `modify_columns` - Not implemented yet.
  </li>

  <li>
    `create_table_options` - Options from `/create/table`, allowing the structure of the table to be defined independently of the data source
  </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/create_table_external.rs#L148-L159)
pub async fn [create\_table\_external\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-table-external.md#method.create_table_external_raw)( \&self, request: &[CreateTableExternalRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTableExternalResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`CreateTableExternalRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalRequest) to the `/create/table/external` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_table_external.rs#L163-L175)
pub async fn [create\_table\_external\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-table-external.md#method.create_table_external_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[CreateTableExternalRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTableExternalResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`CreateTableExternalRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTableExternalRequest) 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.