Azure Synapse 创建管道 Rest API

标签 azure azure-databricks azure-synapse azure-data-factory

我正在使用 Databricks Notebook JSON 事件调用 Azure Synapse Pipeline Create Pipeline REST API。

Synapse Pipeline 屏幕中出现错误消息:无法加载资源“PLDB2”。请确保 JSON 中没有错误并且引用的资源存在。状态:无法读取未定义的属性(读取“toLowerCase”),可能的原因:无法读取未定义的属性(读取“toLowerCase”)

postman :https://mysynapseworkspace.dev.azuresynapse.net/pipelines/PLDB2?api-version=2020-12-01

链接: https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/pipeline/create-or-update-pipeline?tabs=HTTP

https://learn.microsoft.com/en-us/azure/data-factory/transform-data-databricks-notebook?context=%2Fazure%2Fsynapse-analytics%2Fcontext%2Fcontext&tabs=synapse-analytics

在 Postman Body 中创建管道 JSON

{
"name": "PLDB2",
"properties": {
    "description": "Databricks Notebook",
    "activities": [
        {
            "activity": {
                "name": "MyActivity",
                "description": "MyActivity description",
                "type": "DatabricksNotebook",
                "linkedServiceName": {
                    "referenceName": "LS_Databricks",  
                    "type": "LinkedServiceReference"
                },
                "typeProperties": {            
                    "notebookPath": "/Users/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d7b6b5b497baaeb2bab6bebbf9b4b8ba" rel="noreferrer noopener nofollow">[email protected]</a>/Test_Job_1"
                }
            }
        }
    ]
}

}

Synape Pipeline 项目创建时带有上述错误消息:

{
"id": "/subscriptions/mysubscription/resourceGroups/myresourcegroup/providers/Microsoft.Synapse/workspaces/mysynapseworkspace/pipelines/PLDB2",
"name": "PLDB2",
"type": "Microsoft.Synapse/workspaces/pipelines",
"etag": "9400d55f-0000-0100-0000-63b180e40000",
"properties": {
    "description": "Databricks Notebook",
    "activities": [
        {
            "activity": {
                "name": "MyActivity",
                "description": "MyActivity description",
                "type": "DatabricksNotebook",
                "linkedServiceName": {
                    "referenceName": "LS_Databricks_Personify",
                    "type": "LinkedServiceReference"
                },
                "typeProperties": {
                    "notebookPath": "/Users/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d23212c3a0d3c382c283f2c24233e242a25393e632e2220" rel="noreferrer noopener nofollow">[email protected]</a>/Test_Job_1"
                }
            }
        }
    ],
    "lastPublishTime": "2023-01-01T12:47:32Z"
}

}

在 Azure Synapse 中,我可以手动创建并运行调用 JSON 中描述的 Databricks“Test_Job_1”笔记本的管道。

有什么问题吗?谢谢帮助。

最佳答案

我发现了问题。在 JSON 中,删除以下 2 行: "activity": { 及其右括号 "}"

{
"name": "Correct JSON",
"properties": {
    "activities": [
        {
            "name": "MyActivity",
            "description": "MyActivity description",
            "type": "DatabricksNotebook",
            "linkedServiceName": {
                "referenceName": "LS_Databricks",
                "type": "LinkedServiceReference"
            },
            "typeProperties": {
                "notebookPath": "/Users/a<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="680a0b2805110d05090104460b0705" rel="noreferrer noopener nofollow">[email protected]</a>/Test_Job_1"
            }
        }
    ]
}

}

关于Azure Synapse 创建管道 Rest API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74974871/

相关文章:

azure - 无法使用 MQTT 和 ESP8266 订阅 Azure 设备孪生

mysql - 如何在 scala/python 中将计算列添加到数据框中?

sql-server - 动态分区值 SQL Server Azure Synapse

c# - Databricks API 2.0 - 集群获取响应 - TEMPORARILY_UNAVAILABLE

azure - 达美实时表功能缺失

azure - 一个源到多个汇的 azure 突触管道?

azure - 找不到 CREDENTIAL '<db_scoped_creds>' ,因为它不存在或您没有权限

azure - 如何在 Azure 虚拟机上安装 Redis 缓存?

Azure 函数对免费套餐设置硬性限制

azure - 在 Kusto 中使用 union 合并 2 个结果集