writeTable
The writeTable method will write a table to a standard Parquet file.
Syntax
Note
To write multiple tables at once, use writeTables:
Parameters
| Parameter | Type | Description |
|---|---|---|
| sourceTable | Table | The table to write to file. |
| destPath | String | Path name or URI of the file where the table will be stored. The file name should end with the |
| writeInstructions optional | ParquetInstructions | Instructions for customizations while writing. For simple compression, use predefined constants:
If not specified, defaults to For advanced options such as Row Group configuration, metadata file generation, index columns, and S3 support, use |
Returns
A Parquet file located in the specified path.
Examples
Note
All examples in this document write data to the /data directory in Deephaven. For more information on this directory and how it relates to your local file system, see Docker data volumes.
Single Parquet file
In this example, writeTable writes the source table to /data/output.parquet.
Compression codec
In this example, writeTable writes the source table /data/output_GZIP.parquet with GZIP compression.