使用Azure Data Factory连接Cosmos Table API时遇密钥格式错误求助
问题解决:Cosmos Table API密钥认证连接错误(错误代码9082)
问题根源
你当前使用的是CosmosDb类型的Linked Service,该类型为Cosmos SQL API设计,要求密钥为Base64格式;而Cosmos Table API的访问密钥是普通字符串格式,两者不兼容,因此触发格式错误提示。
解决方案
将Linked Service的类型改为AzureTableStorage,适配Table API的密钥格式,配置示例如下:
{ "name": "CosmosTableAPILinkedService", "properties": { "type": "AzureTableStorage", "typeProperties": { "accountName": "XXXXXXX", "accountKey": { "type": "AzureKeyVaultSecret", "store": { "referenceName": "ls_cosmos_key", "type": "LinkedServiceReference" }, "secretName": "cosmostablekey" } }, "connectVia": { "referenceName": "AutoResolveIntegrationRuntime", "type": "IntegrationRuntimeReference" } } }
额外检查项
- 确认Key Vault中存储的
cosmostablekey确实是Cosmos Table API的访问密钥(而非SQL API的密钥) - 验证Key Vault链接服务
ls_cosmos_key已配置正确权限,允许ADF访问该密钥 - 确保集成运行时能够正常访问Key Vault和Cosmos Table API的网络环境
内容的提问来源于stack exchange,提问作者Jaya Prakash
相关产品推荐
相关产品推荐

