Feedback
latest
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);
Sharding Options¶
Following table options can used to adjust the sharding of a table. See also CrateDB Sharding Documentation.
Name |
Description |
---|---|
|
Specifies the number of shards a table is stored in. Must be greater than 0. |
|
Allows to explicitly specify a column or field on which rows are sharded by. |
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);