- Name
- Schema
- Access Mode
- TTL
- Columns
- Column Indexes
- Low-Cardinality Indexes
- Chunk Skip Indexes
- Geospatial Indexes
- CAGRA Indexes
- HNSW Indexes
- Foreign Keys
- Partitions
- Tier Strategy
- External Data Source Subscription
Rename Table
A table can be renamed, following the supported naming criteria.Rename Table Syntax
Any tables with foreign keys that
target this table must be dropped before it can be renamed.
Move Table
A table can be moved from one schema to another.Move Table Syntax
Any tables with foreign keys that
target this table must be dropped before it can be moved.
sales_2017 table from the example_olap schema
to the example_archive schema:
Move Table Example
Set Access Mode
A table can have its global accessibility modified for all users in the system, independently from and further restricting any role-based access controls in place. Note that changing the access mode cannot widen access for users not already granted access; it can only narrow access for those who already have access. This setting will also trump administrative access to a table.Set Table Access Mode Syntax
Set TTL
A table’s time-to-live (TTL) can be altered.Set Table TTL Syntax
Set Table TTL Example
Set Table No Expiration Example
Add Column
A column can be added, specifying a column definition.Add Table Column Syntax
DEFAULT keyword. These values can either be a string/numeric constant or
the name of an existing column in the table from which values can be copied into
the new column. This default value is only in effect for the column creation;
the new column will have no default value after that.
Examples
To add, to the employee table, a salary column that is a non-nullable,
10-digit number field containing 2 decimal places with a default value of 0:
Add Table Column (Numeric) Example
employee table, a category column that is a nullable,
dictionary-encoded, 32-character text
field:
Add Table Column (CharN/Dictionary-Encoded) Example
employee table, a bio column that is a nullable,
text-searchable, unrestricted-width text field:
Add Table Column (String/Text-Searchable) Example
Rename Column
An existing column can be renamed.Rename Table Column Syntax
Any tables with foreign keys that
target the column being renamed must be dropped before it can be renamed.
Rename Table Column Example
Modify Column
A column can have its column definition modified, affecting column type, column size, column properties, and nullability.Modify Table Column Syntax
Modify Table Column Alternate Syntax
Any tables with foreign keys that
target the column being modified must be dropped before it can be modified.
0 for numeric fields.
Examples
To change, in the employee table, the first_name column to one that is a
non-nullable, dictionary-encoded,
50-character text field:
Modify Table Column Example
Drop Column
An existing column can be removed from a table.Drop Table Column Syntax
Any tables with foreign keys that
target the column being dropped must be dropped before it can be dropped.
Add Column Index
A column (attribute) index can be added to a table column in order to improve the performance of operations whose expressions contain relational operators against the column. See Limitations for restrictions.Add Table Column Index Syntax
employee table’s last_name column:
Add Table Column Index Example
Drop Column Index
An existing column (attribute) index can be removed from a table.Drop Table Column Index Syntax
employee table’s last_name column:
Drop Table Column Index Example
Add Low-Cardinality Index
A low-cardinality index can be added to a table column with few distinct values in order to improve the performance of operations whose expressions contain relational operators against the column. See Limitations for restrictions.Add Table Low-Cardinality Index Syntax
employee table’s dept_id column:
Add Table Low-Cardinality Index Example
Drop Low-Cardinality Index
An existing low-cardinality index can be removed from a table.Drop Table Low-Cardinality Index Syntax
employee table’s dept_id column:
Drop Table Low-Cardinality Index Example
Add Chunk Skip Index
A chunk skip index can be added to a table column in order to improve the performance of operations containing equality-based filters against the column. See Limitations for restrictions.Add Table Chunk Skip Index Syntax
employee table’s employee ID column:
Add Table Chunk Skip Index Example
Drop Chunk Skip Index
An existing chunk skip index can be removed from a table.Drop Table Chunk Skip Index Syntax
employee table’s employee ID column:
Drop Table Chunk Skip Index Example
Add Geospatial Index
A geospatial index can be added to one or more table columns to improve the performance of geospatial functions applied to them.Add Table Geospatial Index Syntax
employee table’s work district WKT column:
Add Table WKT Geospatial Index Example
employee table’s office location coordinate pair columns:
Add Table Coordinate Pair Geospatial Index Example
Drop Geospatial Index
An existing geospatial index can be removed from a table.Drop Table Geospatial Index Syntax
employee table’s work
district WKT column:
Drop Table WKT Geospatial Index Example
employee table’s office location
coordinate pair columns:
Drop Table Coordinate Pair Geospatial Index Example
Add CAGRA Index
A CAGRA index can be added to a table column in order to improve the performance of vector searches applied to the column.Add Table CAGRA Index Syntax
employee table’s profile column:
Add Table CAGRA Index Example
Refresh CAGRA Index
An existing CAGRA index can be refreshed.Refresh Table CAGRA Index Syntax
employee table’s profile column:
Refresh Table CAGRA Index Example
Drop CAGRA Index
An existing CAGRA index can be removed from a table.Drop Table CAGRA Index Syntax
employee table’s profile column:
Drop Table CAGRA Index Example
Add HNSW Index
An HNSW index can be added to a table column in order to improve the performance of vector searches applied to the column.Add Table HNSW Index Syntax
employee table’s profile column:
Add Table HNSW Index Example
Drop HNSW Index
An existing HNSW index can be removed from a table.Drop Table HNSW Index Syntax
employee table’s profile column:
Drop Table HNSW Index Example
Add Foreign Key
A foreign key can be added to any column or set of columns with primary key applicable types in order to improve the performance of join operations between the table being altered and the table referenced in the foreign key.Add Table Foreign Key Syntax
employee table’s department ID
column, linking it to the department table’s department ID column:
Add Table Foreign Key Example
Drop Foreign Key
An existing foreign key can be removed from a table, either by the name (alias) given to it during creation or by its definition:Drop Table Foreign Key by Name Syntax
Drop Table Foreign Key by Definition Syntax
employee table’s department ID
column:
Drop Table Foreign Key by Name Example
Drop Table Foreign Key by Definition Example
Add Partition
A partition can be added to a range-partitioned or list-partitioned table.Range Partition
The new partition can be given a minimum bound (inclusive) and a maximum bound (exclusive). If the new partition would come before an existing partition, omitting the maximum bound would cause the new partition to take on the nearest following existing partition’s minimum bound as its maximum bound. If the new partition would come after an existing partition, omitting the minimum bound would cause the new partition to take on the nearest preceding partition’s maximum bound as its minimum bound. If no partitions are present in the table, the new partition will have to declare both a minimum and maximum bound.Add Table Range Partition Syntax
customer_order_range_by_year table,
containing all records with a partition key less than 2020 and greater
than or equal to the maximum bound of the nearest preceding partition:
Add Table Range Partition Example
List Partition
The new partition can be given a list of values to match against the partition key values of incoming records.Add Table List Partition Syntax
customer_order_manual_list_partition_by_year table, containing all records
from 2020:
Add Table List Partition (Year) Example
customer_order_manual_list_partition_by_year_and_month table, containing all
records from February 2020 & April 2020:
Add Table List Partition (Month) Example
Remove Partition
An existing partition can be removed from a range-partitioned or list-partitioned table, sending all data contained within that partition back to the default partition.Remove Table Partition Syntax
order_2017 from the
customer_order_range_by_year table:
Remove Table Partition Example
Delete Partition
An existing partition can be dropped from a range-partitioned or list-partitioned table, deleting all data contained within it.Delete Table Partition Syntax
order_2014_2016 from the
customer_order_range_by_year table, deleting all data within that
partition:
Delete Table Partition Example
Set Tier Strategy
A table’s eviction priorities can be adjusted by setting its tier strategy.Set Table Tier Strategy Syntax
customer_order table’s tier strategy, to one with
a below-average eviction priority in the
RAM Tier:
Set Table Tier Strategy Example
Reset Table Tier Strategy Syntax
customer_order table’s tier strategy:
Reset Table Tier Strategy Example
Manage Subscription
Any table that is subscribed to a streaming external data source can have that subscription paused, resumed, canceled, or dropped.Manage External Table Subscription Syntax
Once unsubscribed, there is no way to re-subscribe the table to the
data source via
ALTER TABLE. An external table will need to be
re-created, while a table whose subscription was initiated through the
LOAD INTO command can have that command
re-executed.ext_product external table
through the product_ds data source: