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

[Feature]: Create new resource to create SNOWFLAKE.ML.CLASSIFICATION models #2896

Open
1 task
danu165 opened this issue Jun 28, 2024 · 5 comments
Open
1 task
Labels
feature-request Used to mark issues with provider's missing functionalities resource:snowflake_ml_classification

Comments

@danu165
Copy link

danu165 commented Jun 28, 2024

Use Cases or Problem Statement

We need the ability to create/update/drop classification models through terraform as we will only allow classification models to be created through terraform.

A simple example of a create statement looks like this:

CREATE OR REPLACE SNOWFLAKE.ML.CLASSIFICATION model(
    INPUT_DATA => SYSTEM$REFERENCE('view', 'binary_classification_view'),
    TARGET_COLNAME => 'label'
);

Docs on CREATE CLASSIFICATION: https://docs.snowflake.com/sql-reference/classes/classification/commands/create-classification
Docs on ALTER CLASSIFICATION: https://docs.snowflake.com/sql-reference/classes/classification/commands/alter-classification
Docs on DROP CLASSIFICATION: https://docs.snowflake.com/sql-reference/classes/classification/commands/drop-classification
Docs on SHOW CLASSIFICATION: https://docs.snowflake.com/sql-reference/classes/classification/commands/show-classification

Category

category:resource

Object type(s)

No response

Proposal

Create a new resource, perhaps named snowflake_ml_classification that implements the CREATE/ALTER/SHOW/DROP statements as documented in the use cases section.

How much impact is this issue causing?

Low

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@danu165 danu165 added the feature-request Used to mark issues with provider's missing functionalities label Jun 28, 2024
@sfc-gh-jmichalak
Copy link
Collaborator

Hey @danu165. Thanks for reaching out to us.

SNOWFLAKE.ML.CLASSIFICATION is still in preview, so it is not part of the V1 scope. For now, you can use https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/unsafe_execute, which can run any SQL statement. We will also welcome a contribution (check https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/CONTRIBUTING.md).

cc: @sfc-gh-sthyagaraj

@danu165
Copy link
Author

danu165 commented Nov 21, 2024

Hi @sfc-gh-jmichalak, I see that CLASSIFICATION is now GA: https://docs.snowflake.com/en/release-notes/2024/other/2024-11-12-ml-functions-classification-ga

We do not have an option to use unsafe_execute due to its risks. Will this be considered for V1 scope now? Same question applies for #2895

@sfc-gh-asawicki
Copy link
Collaborator

@danu165
Copy link
Author

danu165 commented Nov 27, 2024

@sfc-gh-asawicki what about this classification resource and granting classification roles? Unsafe_execute is unlikely to be approved in our org. Even if it was, there would eventually be a lot of upheaval to migrate from unsafe_execute to the dedicated classification resources which would create a poor user experience on our side.

@sfc-gh-asawicki
Copy link
Collaborator

Currently, this is the only option to manage them through Terraform using our provider. ALternatively, we are open for contributions (following the guidelines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used to mark issues with provider's missing functionalities resource:snowflake_ml_classification
Projects
None yet
Development

No branches or pull requests

3 participants