ALTER ONLINE FEATURE TABLE¶
Modifies the properties of an existing online feature table.
- See also:
CREATE ONLINE FEATURE TABLE , DESCRIBE ONLINE FEATURE TABLE, DROP ONLINE FEATURE TABLE , SHOW ONLINE FEATURE TABLES
Syntax¶
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> { SUSPEND | RESUME }
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> RENAME TO <new_name>
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> REFRESH
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> SET COMMENT = '<string_literal>'
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> SET
[ TARGET_LAG = '<num> { seconds | minutes | hours | days }' ]
[ WAREHOUSE = <warehouse_name> ]
ALTER ONLINE FEATURE TABLE [ IF EXISTS ] <name> <tagAction>
Parameters¶
nameSpecifies the identifier for the online feature table to alter.
If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
For more information, see Identifier requirements.
RENAME TO new_nameChanges the name of the online feature table to
new_name. The new identifier must be unique for the schema.For more details about identifiers, see Identifier requirements.
When an object is renamed, other objects that reference it must be updated with the new name.
SUSPEND | RESUMESpecifies whether the periodic background refreshes of the data in the table are suspended or resumed.
SUSPENDSuspends the periodic background refreshes of the online feature table.
RESUMEResumes the periodic background refreshes of the online feature table.
REFRESHSpecifies that the online feature table must be manually refreshed.
SET ...Sets one or more specified properties or parameters for the online feature table:
TARGET_LAG = 'num { seconds | minutes | hours | days }'Specifies the new target lag to use to define the schedule of the background refreshes.
Must be a value between 10 seconds and 8 days, inclusive.
WAREHOUSE = warehouse_nameSpecifies the name of the new warehouse that provides the compute resources for refreshing the online feature table.
COMMENT = 'string_literal'Adds a comment or overwrites an existing comment for the online feature table.
tagActionSets or unsets the tag on the online feature table:
tagAction ::= { SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ] | UNSET TAG <tag_name> [ , <tag_name> ... ] }
SET TAGSets the specified tag and tag value on the online feature table.
UNSET TAGUnsets the specified tag on the online feature table.
Access control requirements¶
Privilege |
Object |
Notes |
|---|---|---|
OWNERSHIP |
Online feature table |
Role that has the OWNERSHIP privilege on the online feature table. |
USAGE |
Warehouse |
Required when changing the warehouse |
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Usage notes¶
Regarding metadata:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.
Examples¶
The following example suspends the periodic background refreshes for the online feature table named my_online_feature_table:
ALTER ONLINE FEATURE TABLE my_online_feature_table SUSPEND;
The following example manually refreshes the online feature table named my_online_feature_table:
ALTER ONLINE FEATURE TABLE my_online_feature_table REFRESH;
The following example changes the target lag for the online feature table named my_online_feature_table:
ALTER ONLINE FEATURE TABLE my_online_feature_table SET TARGET_LAG = '1 minute';
The following example changes the name of the online feature table my_online_feature_table to my_new_online_feature_table:
ALTER ONLINE FEATURE TABLE my_online_feature_table RENAME TO my_new_online_feature_table;