gpt4 book ai didi

json - 如何使用 Excel Power Query 仅从 Azure Blob 存储查询值?

转载 作者:行者123 更新时间:2023-12-03 05:44:54 27 4
gpt4 key购买 nike

我正在尝试使用 Excel Power Query 从 Azure Blob 存储查询一些聊天机器人数据。不幸的是,Excel 单元格不仅包含值,还包含每个单元格中的键。

这是我的 blob 存储中的 blob 的一些示例内容。数据始终具有相同的结构。

{"id":"3398","realId":"3398","document":{"userID":"3398","name":"Testdurchgang","age":18,"gender":"männlich","education":"Diplom","complete":true,"advisoryConversationId":"6EFa4fsLaJhB4U1LlwNksU-f","roundCounter":5,"riskchoices":["A","A","A","A","B","B","B","B","B","B"],"riskAssessmentComplete":true,"riskDescription":"risikoneutral","order":["2","1","0"],"botRecommendation":"Breen GmbH","choice":"ACG GmbH","follow":false,"eTag":"*","resultConversationId":"Kxw9FZ2KwdWKqElSQQ0nG2-f","win1":"none","win2":"ACG GmbH","loss1":"Breen GmbH","loss2":"Plus GmbH","payout":"Du bekommst 6500 Geldeinheiten = 6,50€ ausgezahlt.","payoutNumber":"6,5"}}

Power Query 工具中的数据如下所示:

enter image description here

如您所见,第一列甚至包含 JSON 中的括号,第 3 列包含“内容”标签。在最好的情况下,我只想要每个单元格中的值。如果需要,我可以手动设置列描述。

有办法实现吗?

我知道我可以使用 Excel 函数来完成此操作,但这并不是一个很好的解决方案。

提前谢谢您。

最佳答案

确保存储在存储 blob 容器中的文件为 .json 格式。

能够将示例内容上传到 blob 中,如下所示

{
"id": "3398",
"realId": "3398",
"document": {
"userID": "3398",
"name": "Testdurchgang",
"age": 18,
"gender": "männlich",
"education": "Diplom",
"complete": true,
"advisoryConversationId": "6EFa4fsLaJhB4U1LlwNksU-f",
"roundCounter": 5,
"riskchoices": [
"A",
"A",
"A",
"A",
"B",
"B",
"B",
"B",
"B",
"B"
],
"riskAssessmentComplete": true,
"riskDescription": "risikoneutral",
"order": [
"2",
"1",
"0"
],
"botRecommendation": "Breen GmbH",
"choice": "ACG GmbH",
"follow": false,
"eTag": "*",
"resultConversationId": "Kxw9FZ2KwdWKqElSQQ0nG2-f",
"win1": "none",
"win2": "ACG GmbH",
"loss1": "Breen GmbH",
"loss2": "Plus GmbH",
"payout": "Du bekommst 6500 Geldeinheiten = 6,50€ ausgezahlt.",
"payoutNumber": "6,5"
}
}

在Excel中可以导入

enter image description here

点击“Binary”,应该会看到下面的内容

enter image description here

点击“录制”,应该会看到下面的内容

enter image description here

插入表格应显示如下内容

enter image description here

希望以上步骤对您有所帮助!

关于json - 如何使用 Excel Power Query 仅从 Azure Blob 存储查询值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55341427/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com