You must define a few essential pieces of information in the command. You can
also specify a range of other processing, formatting, and logging options, as
needed.
ybunload [options] -t table -o destination
[options]
: You will need to set some database
connection values if they are not already set with environment
variables. Other options depend on the nature of the data and related
formatting requirements for the load. For details, see ybunload Options or the online help text.
table
: the target table for the unload. Alternatively,
you can unload the results of a query, using the -s
(select) option instead of -t
.
destination
: a local file system path or an S3 bucket.
You can also unload to stdout
. You can specify a prefix
for the output files so that they are named consistently and uniquely
for a given unload.
For more details, see
ybunload Options and
ybunload Examples.
Tip: If
you are regularly unloading data into the same directory location with the
same prefix, use the --truncate-existing
option to remove
files from previous runs. Otherwise, the output directory may contain a mix
of unload files from different runs, or the unload may fail with an error.