-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for cortex search service (#2860)
Adds resource & datasource for Cortex search service objects. ## Test Plan * [x] unit tests * [x] acceptance tests * [ ] integration tests * [ ] real usage in my private repo/account PTAL @sfc-gh-mloring Currently blocked on what looks like a bug in the SQL create flow where the following occurs. ``` CREATE CORTEX SEARCH SERVICE CODA.CHRIS.CHRIS_TF_TEST ON TEXT_COL WAREHOUSE = "TEST" TARGET_LAG = '1 hour' COMMENT = 'Chris Terraform Test Search Service' AS SELECT USER_ID, DOC_ID, TEXT_COL FROM CODA.CHRIS.CHRIS_TF_TEST; Cannot perform operation. This session does not have a current database. Call 'USE DATABASE', or use a qualified name. ```
- Loading branch information
1 parent
d525fd9
commit 43aa89f
Showing
37 changed files
with
2,203 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
page_title: "snowflake_cortex_search_services Data Source - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_cortex_search_services (Data Source) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `in` (Block List, Max: 1) IN clause to filter the list of cortex search services. (see [below for nested schema](#nestedblock--in)) | ||
- `like` (String) Filters the output with **case-insensitive** pattern, with support for SQL wildcard characters (`%` and `_`). | ||
- `limit` (Block List, Max: 1) Limits the number of rows returned. If the `limit.from` is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with `starts_with` or `like`. (see [below for nested schema](#nestedblock--limit)) | ||
- `starts_with` (String) Filters the output with **case-sensitive** characters indicating the beginning of the object name. | ||
|
||
### Read-Only | ||
|
||
- `cortexSearchServices` (List of Object) Holds the output of SHOW CORTEX SEARCH SERVICES. (see [below for nested schema](#nestedatt--cortexSearchServices)) | ||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--in"></a> | ||
### Nested Schema for `in` | ||
|
||
Optional: | ||
|
||
- `account` (Boolean) Returns records for the entire account. | ||
- `database` (String) Returns records for the current database in use or for a specified database (db_name). | ||
- `schema` (String) Returns records for the current schema in use or a specified schema (schema_name). | ||
|
||
|
||
<a id="nestedblock--limit"></a> | ||
### Nested Schema for `limit` | ||
|
||
Required: | ||
|
||
- `rows` (Number) The maximum number of rows to return. | ||
|
||
Optional: | ||
|
||
- `from` (String) Specifies a **case-sensitive** pattern that is used to match object name. After the first match, the limit on the number of rows will be applied. | ||
|
||
|
||
<a id="nestedatt--cortexSearchServices"></a> | ||
### Nested Schema for `cortexSearchServices` | ||
|
||
Read-Only: | ||
|
||
- `comment` (String) | ||
- `created_on` (String) | ||
- `database_name` (String) | ||
- `name` (String) | ||
- `schema_name` (String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
page_title: "snowflake_cortex_search_service Resource - terraform-provider-snowflake" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# snowflake_cortex_search_service (Resource) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `database` (String) The database in which to create the Cortex search service. | ||
- `name` (String) Specifies the name of the Cortex search service. The name must be unique for the schema in which the service is created. | ||
- `on` (String) Specifies the column to use as the search column for the Cortex search service; must be a text value. | ||
- `query` (String) Specifies the query to use to populate the Cortex search service. | ||
- `schema` (String) The schema in which to create the Cortex search service. | ||
- `target_lag` (String) Specifies the maximum target lag time for the Cortex search service. | ||
- `warehouse` (String) The warehouse in which to create the Cortex search service. | ||
|
||
### Optional | ||
|
||
- `attributes` (List of String) Specifies the list of columns in the base table to enable filtering on when issuing queries to the service. | ||
- `comment` (String) Specifies a comment for the Cortex search service. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.