Exporting Data
COPY TO
<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
.
Available properties in the optional WITH clause are described in the following table.
When using the COPY TO
command, you might encounter the following error:
To avoid this error, use the heavysql
command \cpu
to put your HEAVY.AI server in CPU mode before using the COPY TO
command. See Configuration.