Sign InTry Free

ticloud serverless import start

Start a data import task:

ticloud serverless import start [flags]

Or use the following alias command:

ticloud serverless import create [flags]

Examples

Start an import task in interactive mode:

ticloud serverless import start

Start a local import task in non-interactive mode:

ticloud serverless import start --local.file-path <file-path> --cluster-id <cluster-id> --file-type <file-type> --local.target-database <target-database> --local.target-table <target-table>

Start a local import task with custom upload concurrency:

ticloud serverless import start --local.file-path <file-path> --cluster-id <cluster-id> --file-type <file-type> --local.target-database <target-database> --local.target-table <target-table> --local.concurrency 10

Start a local import task with custom CSV format:

ticloud serverless import start --local.file-path <file-path> --cluster-id <cluster-id> --file-type CSV --local.target-database <target-database> --local.target-table <target-table> --csv.separator \" --csv.delimiter \' --csv.backslash-escape=false --csv.trim-last-separator=true

Flags

In non-interactive mode, you need to manually enter the required flags. In interactive mode, you can just follow CLI prompts to fill them in.

FlagDescriptionRequiredNote
-c, --cluster-id stringSpecifies the cluster ID.YesOnly works in non-interactive mode.
--source-type stringSpecifies the import source type. The default value is LOCAL.NoOnly works in non-interactive mode.
--local.concurrency intSpecifies the concurrency for uploading files. The default value is 5.NoOnly works in non-interactive mode.
--local.file-path stringSpecifies the path of the local file to be imported.NoOnly works in non-interactive mode.
--local.target-database stringSpecifies the target database to which the data is imported.NoOnly works in non-interactive mode.
--local.target-table stringSpecifies the target table to which the data is imported.NoOnly works in non-interactive mode.
--file-type stringSpecifies the import file type. Currently, only CSV is supported.YesOnly works in non-interactive mode.
--csv.backslash-escapeSpecifies whether to parse backslash inside fields as escape characters in a CSV file. The default value is true.NoOnly works in non-interactive mode.
--csv.delimiter stringSpecifies the delimiter used for quoting a CSV file. The default value is \.NoOnly works in non-interactive mode.
--csv.separator stringSpecifies the field separator in a CSV file. The default value is ,.NoOnly works in non-interactive mode.
--csv.trim-last-separatorSpecifies whether to treat the separator as the line terminator and trim all trailing separators in a CSV file.NoOnly works in non-interactive mode.
-h, --helpShows help information for this command.NoWorks in both non-interactive and interactive modes.

Inherited flags

FlagDescriptionRequiredNote
--no-colorDisables color in output.NoOnly works in non-interactive mode. In interactive mode, disabling color might not work with some UI components.
-P, --profile stringSpecifies the active user profile used in this command.NoWorks in both non-interactive and interactive modes.
-D, --debugEnables debug mode.NoWorks in both non-interactive and interactive modes.

Feedback

If you have any questions or suggestions on the TiDB Cloud CLI, feel free to create an issue. Also, we welcome any contributions.

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.