Appearance
ybunload Command
Each ybunload
command defines:
- A target table or a
SELECT
statement. All referenced tables must exist in the database, and theybunload
client user must haveSELECT
privileges on those tables. - An absolute or relative path to a destination directory (local, S3, Azure)
- Database connection options
- Options for processing the unload, formatting the output, and compressing the data
Basic Syntax
ybunload { -t name | -s "query" } -o destination [options]
You can unload either all of the rows in a single table (-t
) or the results of a valid query (-s
). Only SELECT
statements are supported with the -s
or --select
option. You cannot unload the results of other SQL statements, such as INSERT
or CREATE TABLE AS
(CTAS
).
Use -?
or --help
to return a list and description of the basic options:
$ ybunload --help
In This Section
Parent topic:Unloading Data