ALTER CORTEX SEARCH SERVICE¶
Modifies the properties of an existing Cortex Search service.
Syntax¶
ALTER CORTEX SEARCH SERVICE [ IF EXISTS ] <name> SET
[ TARGET_LAG = { '<num> { seconds | minutes | hours | days }' } ]
[ WAREHOUSE = <warehouse_name> ]
[ COMMENT = '<string_literal>' ];
Parameters¶
name
Specifies the identifier for the Cortex Search service 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.
SET ...
Sets one or more specified properties or parameters to set for the Cortex Search service:
TARGET_LAG = '<num> { seconds | minutes | hours | days }'
Specifies the maximum amount of time that the Cortex Search service content should lag behind updates to the base tables specified in the source query.
WAREHOUSE = warehouse_name
Specifies the warehouse to use for running the source query, building the search index, and keeping it refreshed per the TARGET_LAG target.
COMMENT = 'string_literal'
Adds a comment or overwrites an existing comment for the search service.
Access Control Requirements¶
Privilege |
Object |
---|---|
OWNERSHIP |
Cortex Search service you want to modify properties on. |
Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.
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¶
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 changes warehouse used by the Cortex Search service named mysvc
to my_new_wh
:
ALTER CORTEX SEARCH SERVICE mysvc SET WAREHOUSE = my_new_wh;
The following example sets the comment field of the Cortex Search service named mysvc
to new_comment
:
ALTER CORTEX SEARCH SERVICE mysvc SET COMMENT = 'new_comment';
The following example changes the target refresh lag of the Cortex Search service named mysvc
to 1 hour
:
ALTER CORTEX SEARCH SERVICE mysvc SET TARGET_LAG = '1 hour';