Veri depoları oluşturma

ŞUNLAR IÇIN GEÇERLIDIR: Azure CLI ml uzantısı v2 (geçerli)Python SDK azure-ai-ml v2 (geçerli)

Bu makalede, Azure Machine Learning veri depoları ile Azure veri depolama hizmetlerine bağlanmayı öğrenin.

Önkoşullar

  • Azure aboneliği. Azure aboneliğiniz yoksa başlamadan önce ücretsiz bir hesap oluşturun. Azure Machine Learning'in ücretsiz veya ücretli sürümünü deneyin.

  • Python için Azure Machine Learning SDK'sı.

  • Azure Machine Learning çalışma alanı.

Not

Azure Machine Learning veri depoları, temel alınan depolama hesabı kaynaklarını oluşturmaz. Bunun yerine, Azure Machine Learning kullanımı için mevcut bir depolama hesabını bağlar. Bunun için Azure Machine Learning veri depoları gerekmez. Temel alınan verilere erişiminiz varsa depolama URI'lerini doğrudan kullanabilirsiniz.

Azure Blob veri deposu oluşturma

from azure.ai.ml.entities import AzureBlobDatastore
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = AzureBlobDatastore(
    name="",
    description="",
    account_name="",
    container_name=""
)

ml_client.create_or_update(store)

Azure Data Lake 2. Nesil veri deposu oluşturma

from azure.ai.ml.entities import AzureDataLakeGen2Datastore
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = AzureDataLakeGen2Datastore(
    name="",
    description="",
    account_name="",
    filesystem=""
)

ml_client.create_or_update(store)

Azure Dosyalar veri deposu oluşturma

from azure.ai.ml.entities import AzureFileDatastore
from azure.ai.ml.entities import AccountKeyConfiguration
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = AzureFileDatastore(
    name="file_example",
    description="Datastore pointing to an Azure File Share.",
    account_name="mytestfilestore",
    file_share_name="my-share",
    credentials=AccountKeyConfiguration(
        account_key= "XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX"
    ),
)

ml_client.create_or_update(store)

Azure Data Lake 1. Nesil veri deposu oluşturma

from azure.ai.ml.entities import AzureDataLakeGen1Datastore
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = AzureDataLakeGen1Datastore(
    name="",
    store_name="",
    description="",
)

ml_client.create_or_update(store)

OneLake (Microsoft Fabric) veri deposu oluşturma (önizleme)

Bu bölümde OneLake veri deposu oluşturmaya yönelik çeşitli seçenekler açıklanmaktadır. OneLake veri deposu Microsoft Fabric'in bir parçasıdır. Şu anda Azure Machine Learning, klasör/dosya ve Amazon S3 kısayollarını içeren Microsoft Fabric Lakehouse yapıtlarına bağlantıyı destekler. Lakehouse hakkında daha fazla bilgi için Microsoft Fabric'te göl evi nedir? adresini ziyaret edin.

OneLake veri deposu oluşturma işlemi gerektirir

  • Uç nokta
  • Doku çalışma alanı adı veya GUID
  • Yapıt adı veya GUID

microsoft fabric örneğinizdeki bilgiler. Bu üç ekran görüntüsü, bu gerekli bilgi kaynaklarının Microsoft Fabric örneğinizden alınmasını açıklar:

OneLake çalışma alanı adı

Microsoft Fabric örneğinizde, çalışma alanı bilgilerini bu ekran görüntüsünde gösterildiği gibi bulabilirsiniz. Azure Machine Learning OneLake veri deposu oluşturmak için GUID değeri veya "kolay ad" kullanabilirsiniz.

Screenshot that shows Fabric Workspace details in Microsoft Fabric UI.

OneLake uç noktası

Bu ekran görüntüsü, Microsoft Fabric örneğinizde uç nokta bilgilerini nasıl bulabileceğinizi gösterir:

Screenshot that shows Fabric endpoint details in Microsoft Fabric UI.

OneLake yapıt adı

Bu ekran görüntüsü, Yapıt bilgilerini Microsoft Fabric örneğinizde nasıl bulabileceğinizi gösterir. Ekran görüntüsünde, Azure Machine Learning OneLake veri deposu oluşturmak için GUID değerini veya "kolay adı" nasıl kullanabileceğiniz de gösterilir:

Screenshot showing how to get Fabric LH artifact details in Microsoft Fabric UI.

OneLake veri deposu oluşturma

from azure.ai.ml.entities import OneLakeDatastore, OneLakeArtifact
from azure.ai.ml import MLClient

ml_client = MLClient.from_config()

store = OneLakeDatastore(
    name="onelake_example_id",
    description="Datastore pointing to an Microsoft fabric artifact.",
    one_lake_workspace_name="AzureML_Sample_OneLakeWS",
    endpoint="msit-onelake.dfs.fabric.microsoft.com"
    artifact = OneLakeArtifact(
        name="AzML_Sample_LH",
        type="lake_house"
    )
)

ml_client.create_or_update(store)

Sonraki adımlar