gcloud_alpha_sql_import_csv (1)
NAME
- gcloud alpha sql import csv - imports data into a Cloud SQL instance from a CSV file
SYNOPSIS
-
gcloud alpha sql import csv INSTANCE URI --database=DATABASE, -d DATABASE --table=TABLE [--async] [--columns=COLUMNS,[COLUMNS,...]] [--user=USER] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Imports data into a Cloud SQL instance from a plain text file in a
POSITIONAL ARGUMENTS
-
- INSTANCE
-
Cloud SQL instance ID.
- URI
-
Path to the CSV file in Google Cloud Storage from which the import is made. The
URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are
also supported.
REQUIRED FLAGS
-
- --database=DATABASE, -d DATABASE
-
The database (for example, guestbook) to which the import is made.
- --table=TABLE
-
The database table to import csv file into.
OPTIONAL FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --columns=COLUMNS,[COLUMNS,...]
-
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.
- --user=USER
-
PostgreSQL user for this import operation.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud sql import csv $ gcloud beta sql import csv