CrateDB specific table options¶
CrateDB supports a custom CREATE TABLE
syntax for adjusting the table
configuration incl. SHARDING
and PARTITIONING
of the table.
See CrateDB CREATE TABLE Documentation for all supported configuration
options.
All CrateDB specific table options must be passed in using the $options
argument of the DBAL Table()
constructor.
Example:
$options = [];
$options['sharding_shards'] = 5;
$myTable = new Table('my_table', [], [], [], 0, $options);
Partitioning Options¶
Following table options can used to define the partitioning columns of a table. See also CrateDB Partitioned Tables Documentation.
Name |
Description |
---|---|
|
Specifies the columns on which partitions should be created on. |
General Options¶
All general CrateDB specific table options used inside the WITH (...)
clause
can be configured under the table_options
option key.
Example on how to adjust the replicas:
$options = [];
$options['table_options'] = [];
$options['table_options']['number_of_replicas'] = '2';
$myTable = new Table('my_table', [], [], [], 0, $options);