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

Start an S3 import task in non-interactive mode:

ticloud serverless import start --source-type S3 --s3.uri <s3-uri> --cluster-id <cluster-id> --file-type <file-type> --s3.role-arn <role-arn>

Start a GCS import task in non-interactive mode:

ticloud serverless import start --source-type GCS --gcs.uri <gcs-uri> --cluster-id <cluster-id> --file-type <file-type> --gcs.service-account-key <service-account-key>

Start an Azure Blob import task in non-interactive mode:

ticloud serverless import start --source-type AZURE_BLOB --azblob.uri <azure-blob-uri> --cluster-id <cluster-id> --file-type <file-type> --azblob.sas-token <sas-token>

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
--azblob.sas-token stringSpecifies the SAS token of Azure Blob.NoOnly works in non-interactive mode.
--azblob.uri stringSpecifies the Azure Blob URI in azure://<account>.blob.core.windows.net/<container>/<path> format.NoOnly works in non-interactive mode.
--gcs.service-account-key stringSpecifies the base64 encoded service account key of GCS.NoOnly works in non-interactive mode.
--gcs.uri stringSpecifies the GCS URI in gcs://<bucket>/<path> format. Required when source type is GCS.YesOnly works in non-interactive mode.
--s3.access-key-id stringSpecifies the access key ID of Amazon S3. You only need to set one of the s3.role-arn and [s3.access-key-id, s3.secret-access-key].NoOnly works in non-interactive mode.
--s3.role-arn stringSpecifies the role ARN of Amazon S3. You only need to set one of the s3.role-arn and [s3.access-key-id, s3.secret-access-key].NoOnly works in non-interactive mode.
--s3.secret-access-key stringSpecifies the secret access key of Amazon S3. You only need to set one of the s3.role-arn and [s3.access-key-id, s3.secret-access-key].NoOnly works in non-interactive mode.
--s3.uri stringSpecifies the S3 URI in s3://<bucket>/<path> format. Required when source type is S3.YesOnly works in non-interactive mode.
--source-type stringSpecifies the import source type, one of ["LOCAL" "S3" "GCS" "AZURE_BLOB"]. The default value is "LOCAL".NoOnly works in non-interactive mode.
-c, --cluster-id stringSpecifies the cluster ID.YesOnly 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, one of ["CSV" "SQL" "AURORA_SNAPSHOT" "PARQUET"].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.skip-headerSpecifies whether the CSV file contains a header line.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.
--csv.not-nullSpecifies whether a CSV file can contain any NULL values.NoOnly works in non-interactive mode.
--csv.null-value stringSpecifies the representation of NULL values in the CSV file. (default "\N")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?