使用Databricks Autoloader同步ADLS文件时Event Grid订阅创建失败
Databricks Autoloader 创建Event Grid订阅权限报错问题
我尝试使用Databricks Autoloader从ADLS的一个容器读取文件,将其存储为Delta文件到同一存储账户下名为“Bronze”的另一个容器中的外部Delta表。当使用Trigger=Once选项写入流时,遇到错误:
com.databricks.sql.cloudfiles.errors.CloudFilesException: Failed to create an Event Grid subscription.Please make sure that your service principal has 'write' permissions。
具体错误JSON信息如下:
{ "error" : { "code" : "LinkedAuthorizationFailed", "message" : "The client '910adb4f-a9dd-4666-ace1-xxxxxxxxxx' with object id '910adb4f-a9dd-4666-ace1-xxxxxxxxxx' has permission to perform action 'Microsoft.EventGrid/eventSubscriptions/write' on scope '/subscriptions/485bf1a4-b8c5-48af-ba04-xxxxxxxxx/resourceGroups/StocksDev/providers/Microsoft.Storage/storageAccounts/stockpricesdev/providers/Microsoft.EventGrid/eventSubscriptions/databricks-query-8030d5e2-7058-4cfd-aa7f-b20867633d45-source-0'; however, it does not have permission to perform action(s) 'Microsoft.Storage/storageAccounts/write' on the linked scope(s) '/subscriptions/485bf1a4-b8c5-48af-ba04-xxxxxxxxxx/resourcegroups/StocksDev/providers/Microsoft.Storage/storageAccounts/stockpricesdev' (respectively) or the linked scope(s) are invalid." } }
我已按文档检查服务主体权限:
- 在存储账户
stockpricesdev上拥有Storage Blob Data Contributor权限 - 拥有Storage Queue Data Contributor权限(Runtime>8.0本无需配置,仅为预防添加)
- 在资源组
StocksDev上拥有EventGrid EventSubscription Contributor权限,且能看到范围内的继承角色分配
但仍出现权限问题,疑惑为何Contributor权限不足以执行写入操作。
内容的提问来源于stack exchange,提问作者Manas R
相关产品推荐
相关产品推荐

