GPUdb.alter_table( table_name = None, action = None, value = None, options = {}
)
Apply various modifications to a table or collection. Available modifications include:
Creating or deleting an index on a particular column. This can speed up certain search queries (such as get_records, delete_records, update_records) when using expressions containing equality or relational operators on indexed columns. This only applies to child tables.
Making a table protected or not. Protected tables need the admin password to be sent in a clear_table to delete the table. This can be applied to child tables or collections or views.
Setting the time-to-live (TTL). This can be applied to tables, views, or collections. When applied to collections, every table & view within the collection will have its TTL set to the given value.
Allowing homogeneous child tables. This only applies to collections.
Input Parameter Description
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
table_name | str | Table on which the operation will be performed. Must be a valid table or collection in GPUdb. | ||||||||||||
action | str | Modification operation to be applied to the table or collection
|
||||||||||||
value | str | The value of the modification. May be a column name, 'true' or 'false', or a time-to-live depending on input parameter action. | ||||||||||||
options | dict of str | Optional parameters. Default value is an empty dict ( {} ). |
Output Parameter Description
Name | Type | Description |
---|---|---|
table_name | str | Table on which the operation was performed. |
action | str | Modification operation that was performed. |
value | str | The value of the modification that was performed. |