HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_sql_import_csv.1
.TH "GCLOUD_ALPHA_SQL_IMPORT_CSV" 1



.SH "NAME"
.HP
gcloud alpha sql import csv \- imports data into a Cloud SQL instance from a CSV file



.SH "SYNOPSIS"
.HP
\f5gcloud alpha sql import csv\fR \fIINSTANCE\fR \fIURI\fR \fB\-\-database\fR=\fIDATABASE\fR, \fB\-d\fR \fIDATABASE\fR \fB\-\-table\fR=\fITABLE\fR [\fB\-\-async\fR] [\fB\-\-columns\fR=\fICOLUMNS\fR,[\fICOLUMNS\fR,...]] [\fB\-\-escape\fR=\fIESCAPE\fR] [\fB\-\-fields\-terminated\-by\fR=\fIFIELDS_TERMINATED_BY\fR] [\fB\-\-lines\-terminated\-by\fR=\fILINES_TERMINATED_BY\fR] [\fB\-\-quote\fR=\fIQUOTE\fR] [\fB\-\-user\fR=\fIUSER\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Imports data into a Cloud SQL instance from a plain text file in a
Google Cloud Storage bucket with one line per row and comma\-separated fields.



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fIINSTANCE\fR

Cloud SQL instance ID.

.TP 2m
\fIURI\fR

Path to the CSV file in Google Cloud Storage from which the import is made. The
URI is in the form \f5gs://bucketName/fileName\fR. Compressed gzip files (.gz)
are also supported.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-database\fR=\fIDATABASE\fR, \fB\-d\fR \fIDATABASE\fR

The database (for example, guestbook) to which the import is made.

.TP 2m
\fB\-\-table\fR=\fITABLE\fR

The database table to import csv file into.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-async\fR

Return immediately, without waiting for the operation in progress to complete.

.TP 2m
\fB\-\-columns\fR=\fICOLUMNS\fR,[\fICOLUMNS\fR,...]

The columns to import from csv file. These correspond to actual database columns
to import. If not set, all columns from csv file are imported to corresponding
database columns.

.TP 2m
\fB\-\-escape\fR=\fIESCAPE\fR

Specifies the character that should appear before a data character that needs to
be escaped. The value of this argument has to be a character in Hex ASCII Code.
For example, "22" represents double quotes. This flag is only available for
MySQL and Postgres. If this flag is not provided, double quotes character will
be used as the default value.

.TP 2m
\fB\-\-fields\-terminated\-by\fR=\fIFIELDS_TERMINATED_BY\fR

Specifies the character that splits column values. The value of this argument
has to be a character in Hex ASCII Code. For example, "2C" represents a comma.
This flag is only available for MySQL and Postgres. If this flag is not
provided, a comma character will be used as the default value.

.TP 2m
\fB\-\-lines\-terminated\-by\fR=\fILINES_TERMINATED_BY\fR

Specifies the character that split line records. The value of this argument has
to be a character in Hex ASCII Code. For example, "0A" represents a new line.
This flag is only available for MySQL. If this flag is not provided, a new line
character will be used as the default value.

.TP 2m
\fB\-\-quote\fR=\fIQUOTE\fR

Specifies the character that encloses values from columns that have string data
type. The value of this argument has to be a character in Hex ASCII Code. For
example, "22" represents double quotes. This flag is only available for MySQL
and Postgres. If this flag is not provided, double quotes character will be used
as the default value.

.TP 2m
\fB\-\-user\fR=\fIUSER\fR

PostgreSQL user for this import operation.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud sql import csv
.RE

.RS 2m
$ gcloud beta sql import csv
.RE