Snowflake with azure ML possible?

Joseph Pumelon 0 Reputation points
2023-07-31T16:10:07.22+00:00

Hi Azure, i am connecting my project with data in Snowflake to azure ML. Is that smooth to do so? What is the best way to transfer my data to azure blob storage and how? Please share any suggestions if you have same scenario.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,332 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 53,966 Reputation points Moderator
    2023-07-31T17:58:40.0133333+00:00

    Hello @Joseph Pumelon

    Thanks for reaching out to us, actually you can leverage your Snowflake data source directly, you don't need to move it to Azure.

    Please see here - https://learn.microsoft.com/en-us/azure/machine-learning/how-to-import-data-assets?view=azureml-api-2&tabs=cli

    There is also a sample for Snowflake -

    The following code samples can import data from external databases. The connection that handles the import action determines the external database data source metadata. In this sample, the code imports data from a Snowflake resource. The connection points to a Snowflake source. With a little modification, the connection can point to an Azure SQL database source and an Azure SQL database source. The imported asset type from an external database source is mltable.

    from azure.ai.ml.entities import DataImport
    from azure.ai.ml.data_transfer import Database
    from azure.ai.ml import MLClient
    
    # Supported connections include:
    # Connection: azureml:<workspace_connection_name>
    # Supported paths include:
    # path: azureml://datastores/<data_store_name>/paths/<my_path>/${{name}}
    
    ml_client = MLClient.from_config()
    
    data_import = DataImport(
        name="<name>",
        source=Database(connection="<connection>", query="<query>"),
        path="<path>"
        )
    ml_client.data.import_data(data_import=data_import)
    
    
    

    Please let me know how it works for your scenario. I hope this helps.

    Regards,

    Yutong

    -Please kindly accept the answer and vote 'Yes' if you feel helpful to support the community, thanks a lot.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.