適用於 Python 的 Azure Data Factory 程式庫
使用 Azure Data Factory 將資料儲存、移動和處理服務撰寫到自動化的資料管線中
深入了解 Data Factory,以及透過使用 Python 建立資料處理站和管線的快速入門開始第一步。
管理模組
使用管理模組在訂用帳戶中建立和管理 Data Factory 執行個體。
安裝
使用 pip 安裝套件:
pip install azure-mgmt-datafactory
範例
在美國東部地區的訂用帳戶中建立 Data Factory。
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.resource import ResourceManagementClient
from azure.mgmt.datafactory import DataFactoryManagementClient
from azure.mgmt.datafactory.models import *
import time
#Create a data factory
subscription_id = '<Specify your Azure Subscription ID>'
credentials = ServicePrincipalCredentials(client_id='<Active Directory application/client ID>', secret='<client secret>', tenant='<Active Directory tenant ID>')
adf_client = DataFactoryManagementClient(credentials, subscription_id)
rg_params = {'location':'eastus'}
df_params = {'location':'eastus'}
df_resource = Factory(location='eastus')
df = adf_client.factories.create_or_update(rg_name, df_name, df_resource)
print_item(df)
while df.provisioning_state != 'Succeeded':
df = adf_client.factories.get(rg_name, df_name)
time.sleep(1)
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應