使用 Azure Data Factory 或 Synapse Analytics 從 Dynamics AX 複製資料
適用于: Azure Data Factory Azure Synapse Analytics
提示
試用 Microsoft Fabric 中的 Data Factory,這是適用于企業的單一分析解決方案。 Microsoft Fabric 涵蓋從資料移動到資料科學、即時分析、商業智慧和報告等所有專案。 瞭解如何 免費啟動新的試用版 !
本文概述如何在 Azure Data Factory 和 Synapse Analytics 管線中使用複製活動,從 Dynamics AX 來源複製資料。 本文是以複製活動 為基礎 ,其呈現複製活動的一般概觀。
支援的功能
下列功能支援此 Dynamics AX 連接器:
支援的功能 | IR |
---|---|
複製活動 (source/-) | ① ② |
查閱活動 | ① ② |
(1) Azure 整合執行時間 (2) 自我裝載整合執行時間
如需支援作為來源和接收的資料存放區清單,請參閱 支援的資料存放區 。
具體而言,此 Dynamics AX 連接器支援使用 OData 通訊協定 搭配 服務主體驗證 ,從 Dynamics AX 複製資料。
開始使用
若要使用管線執行複製活動,您可以使用下列其中一個工具或 SDK:
- 複製資料工具
- Azure 入口網站
- The .NET SDK
- The Python SDK
- Azure PowerShell
- The REST API
- Azure Resource Manager 範本
使用 UI 建立 Dynamics AX 的連結服務
使用下列步驟,在 Azure 入口網站 UI 中建立 Dynamics AX 的連結服務。
流覽至 Azure Data Factory 或 Synapse 工作區中的 [管理] 索引標籤,然後選取 [連結服務],然後按一下 [新增]:
搜尋 Dynamics,然後選取 Dynamics AX 連接器。
設定服務詳細資料、測試連線,並建立新的連結服務。
連線or 組態詳細資料
下列各節提供屬性的詳細資料,您可以用來定義 Dynamics AX 連接器專屬的 Data Factory 實體。
必要條件
若要使用服務主體驗證,請遵循下列步驟:
向 Microsoft Identity 平臺註冊應用程式。 若要瞭解如何,請參閱 快速入門:向Microsoft 身分識別平臺 註冊應用程式。 請記下這些值,您用來定義連結服務:
- Application ID
- 應用程式金鑰
- 用戶識別碼
移至 Dynamics AX,並授與此服務主體適當的許可權,以存取您的 Dynamics AX。
連結的服務屬性
Dynamics AX 連結服務支援下列屬性:
屬性 | 描述 | 必要 |
---|---|---|
type | type 屬性必須設定為 DynamicsAX 。 | Yes |
URL | Dynamics AX (或 Dynamics 365 Finance and Operations) 實例 OData 端點。 | Yes |
servicePrincipalId | 指定應用程式的用戶端識別碼。 | Yes |
servicePrincipalKey | 指定應用程式的金鑰。 將此欄位標示為 SecureString 以安全地儲存,或 參考儲存在 Azure 金鑰保存庫 中的秘密。 | Yes |
tenant | 指定應用程式所在的租使用者資訊(功能變數名稱或租使用者識別碼)。 將滑鼠停留在Azure 入口網站右上角以擷取它。 | Yes |
aadResourceId | 指定您要求授權的 AAD 資源。 例如,如果您的 Dynamics URL 是 https://sampledynamics.sandbox.operations.dynamics.com/data/ ,則對應的 AAD 資源通常是 https://sampledynamics.sandbox.operations.dynamics.com 。 |
Yes |
connectVia | 用來 連接到資料存放區的 Integration Runtime 。 您可以選擇 Azure Integration Runtime 或自我裝載 Integration Runtime(如果您的資料存放區位於私人網路中)。 如果未指定,則會使用預設的 Azure Integration Runtime。 | No |
範例
{
"name": "DynamicsAXLinkedService",
"properties": {
"type": "DynamicsAX",
"typeProperties": {
"url": "<Dynamics AX instance OData endpoint>",
"servicePrincipalId": "<service principal id>",
"servicePrincipalKey": {
"type": "SecureString",
"value": "<service principal key>"
},
"tenant": "<tenant info, e.g. microsoft.onmicrosoft.com>",
"aadResourceId": "<AAD resource, e.g. https://sampledynamics.sandbox.operations.dynamics.com>"
}
},
"connectVia": {
"referenceName": "<name of Integration Runtime>",
"type": "IntegrationRuntimeReference"
}
}
資料集屬性
本節提供 Dynamics AX 資料集所支援的屬性清單。
如需可用來定義資料集的完整區段和屬性清單,請參閱 資料集和連結服務 。
若要從 Dynamics AX 複製資料,請將 資料集的 type 屬性設定為 DynamicsAXResource 。 支援下列屬性:
屬性 | 描述 | 必要 |
---|---|---|
type | 資料集的 type 屬性必須設定為 DynamicsAXResource 。 | Yes |
path | Dynamics AX OData 實體的路徑。 | Yes |
範例
{
"name": "DynamicsAXResourceDataset",
"properties": {
"type": "DynamicsAXResource",
"typeProperties": {
"path": "<entity path e.g. dd04tentitySet>"
},
"schema": [],
"linkedServiceName": {
"referenceName": "<Dynamics AX linked service name>",
"type": "LinkedServiceReference"
}
}
}
複製活動屬性
本節提供 Dynamics AX 來源所支援的屬性清單。
如需可用來定義活動的區段和屬性完整清單,請參閱 管線 。
Dynamics AX 作為來源
若要從 Dynamics AX 複製資料,請將 複製活動中的來源 類型設定為 DynamicsAXSource 。 複製活動 來源 區段中支援下列屬性:
屬性 | 描述 | 必要 |
---|---|---|
type | 複製 活動來源的 type 屬性必須設定為 DynamicsAXSource 。 | Yes |
query | 用於篩選資料的 OData 查詢選項。 範例:"?$select=Name,Description&$top=5" 。注意 :連接器會從合併的 URL 複製資料: [URL specified in linked service]/[path specified in dataset][query specified in copy activity source] 。 如需詳細資訊,請參閱 OData URL 元件 。 |
No |
HTTPRequestTimeout | HTTP 要求取得回應的逾時 ( TimeSpan 值)。 此值是取得回應的逾時,而不是讀取回應資料的逾時。 如果未指定,預設值為 00:05:00 (5 分鐘)。 | No |
範例
"activities":[
{
"name": "CopyFromDynamicsAX",
"type": "Copy",
"inputs": [
{
"referenceName": "<Dynamics AX input dataset name>",
"type": "DatasetReference"
}
],
"outputs": [
{
"referenceName": "<output dataset name>",
"type": "DatasetReference"
}
],
"typeProperties": {
"source": {
"type": "DynamicsAXSource",
"query": "$top=10"
},
"sink": {
"type": "<sink type>"
}
}
}
]
查閱活動屬性
若要瞭解屬性的詳細資料,請檢查 查閱活動 。
相關內容
如需複製活動支援做為來源和接收的資料存放區清單,請參閱 支援的資料存放區和格式 。