Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: alerts datasource #1727

Merged
merged 5 commits into from
May 30, 2023

Conversation

mlorek
Copy link
Contributor

@mlorek mlorek commented Apr 18, 2023

alerts datasource

Test Plan

  • acceptance tests

References

https://docs.snowflake.com/en/sql-reference/sql/show-alerts
*

@sfc-gh-swinkler
Copy link
Collaborator

Hello @mlorek . I think I would rather design the interface for this one to be slightly different , so as it follows the structure of the Snowflake API more closely (see below code). It would also be good to see this use the new v2 SDK format, although I realize that is asking a lot. If this is urgent, I could see merging this with some lesser modifications, but then just know that i would eventually make some breaking changes in the future to make it look more like the structure shown below.

data "snowflake_alerts" "d" {
terse = true/false (default false)
like {
 pattern = "<filter pattern>"
}

in {
 account = true / false
 database = "db_name"
 schema = "schema_name>
}

starts_with = "<name_string>"
limit {
 rows = <row_nb>
 from = "<name_string>"
}

alerts = [
 ... (should be complete alert properties and metadata)
]
}

@sfc-gh-swinkler sfc-gh-swinkler marked this pull request as ready for review May 30, 2023 06:14
@sfc-gh-swinkler sfc-gh-swinkler merged commit a1d0d2e into Snowflake-Labs:main May 30, 2023
@sfc-gh-swinkler
Copy link
Collaborator

Thanks @mlorek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants