【发布时间】:2020-02-05 18:57:06
【问题描述】:
我正在使用 Alteryx 2019.3,并希望构建一个使用 JSON 作为输入的工作流。当它读取 JSON 时,它会将 JSON 键值对放入名为 JSON_Name 和 JSON_ValueString 的列中
在我模拟的示例中,下面 JSON 中的字段名称在 JSON_Name 列中如下所示:
customer.0.name
customer.0.contactDetails.0.company
customer.0.contactDetails.0.addressDetails.0.address
customer.0.contactDetails.0.addressDetails.0.addressType
customer.0.departments.0.name
我想要做的是将其拆分为不同的表,并将 JSON_Name 值的最后一部分作为列名,因此它看起来像这样(大写显示表名):
CUSTOMER
customerId
CONTACTDETAILS
customerId
company
ADDRESSDETAILS
customerId
address
addressType
DEPARTMENTS
customerId
name
如何在 Alteryx 中执行此操作,以及当我在 JSON 列表中可能有多个条目时如何使其工作?
感谢您的帮助
JSON 输入(例如模拟)
{
"id": "1234",
"contactDetails": [{
"company": "company1",
"addressDetails":
[{
"address": "City1",
"addressType": "Business"
}]
}]
"departments":
[{
"name": "dept1
}]
}
【问题讨论】:
标签: alteryx