<file path>
must be a path on the server. This command exports the results of any SELECT statement to the file. There is a special mode when <file path>
is empty. In that case, the server automatically generates a file in <HEAVY.AI Directory>/export
that is the client session id with the suffix .txt
.array_null_handling
'abort'
- Abort the export. Default.'raw'
- Export null elements as raw values.'zero'
- Export null elements as zero (or an empty string).'nullfield'
- Set the entire array column field to null for that row.'abort'
delimiter
,
for CSV files\t
for tab-delimited files|
,~
, ^
, and;
.','
(CSV file)escape
'
(quote)file_compression
'none'
'gzip'
'zip'
'none'
file_type
'csv'
- Comma-separated values file.'geojson'
- FeatureCollection GeoJSON file.'geojsonl'
- Multiline GeoJSONL file.'shapefile'
- Geospatial shapefile.'csv'
header
'true'
or 'false'
, indicating whether to output a header line for all the column names. Applies to only CSV and tab-delimited files.'true'
layer_name
line_delimiter
'\n'
nulls
'NA'
, or \N
quote
"
(double quote)quoted
'true'
or 'false'
, indicating whether all the column values should be output in quotes. Applies to only CSV and tab-delimited files.'true'
COPY TO
command, you might encounter the following error:heavysql
command \cpu
to put your HEAVY.AI server in CPU mode before using the COPY TO
command. See Configuration.