我正在使用 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
在 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/