mule 4 dataweave 2.0 で json を csv 形式に変換しようとしています。しかし、それは機能していません。dataweave に追加する csv 形式に固有のものはありますか? 私は自分のdw書き込みで試しました:
%dw 2.0
output application/csv
---
payload
私のjson入力ファイルの下を親切に見つけてください:
{"exportId": "WakeupHierarchy",
"instance": "20190821151943036",
"content": [
{
"file": {
"header": {
"id": "12",
"name": "WakeupHierarchy",
"description": "Wakeup Hierarchy",
"version": "1.0"
},
"body": {
"records": [{
"alternateHierarchy": "ACD",
"tablePath": "/root/account/Account",
"referenceDataForeignKey": { "linked_record": {}},
"accountForeignKey": {
"linked_record": {
"id": 100199493,
"identification": {
"sapId": "100091984",
"name": "CHILDRENS HOSPITAL & MEDICAL CENTER"},
"address": {
"line1": "8200 DODGE ST",
"line2": "ACCOUNTS PAYABLE" },
"functions": {
"commercialCustomer": true,
"shipTo": true },
"otherProperties": {
"status": "A",
"sapOrderBlockStatus": null},
"hierarchies": {
"memberships": []},
"affiliations": {
"shipTo": [],
"billTo": []},
"accountTBD": { "credit": {"creditAccount": null},
"franchise": {"franchiseActivity": null },
"tbdGroup": {
"vcRebateProgram": null,
"vcOrSurgicalBasedOnProductPurchasingVcSgOrBoth": null }},
"technicalData": {
"lastUser": "edie.belzner@alcon.com",
"linkedTable": "/root/account/Account"}}},
"technicalData": {
"lastUser": "ed.com",
"primaryKey": "A93"}},
{ "alternateHierarchy": "ACD",
"tablePath": "/root/account/Account",
"referenceDataForeignKey": {
"linked_record": {}},
"accountForeignKey": {
"linked_record": {
"id": 19,
"identification": {
"sapId": null,
"sfdcId": "803827"},
"address": {
"line1": "2601 S MCKENZIE ST STE 234",
"line2": null},
"functions": {
"commercialCustomer": false,
"shipTo": false},
"otherProperties": {
"status": null,
"sapOrderBlockStatus": null},
"hierarchies": {
"memberships": []},
"affiliations": {
"shipTo": [],
"billTo": []},
"accountTBD": {"credit": {"creditAccount": null},
"franchise": {"franchiseActivity": null},
"tbdGroup": {
"vcRebateProgram": null,
"vcOrSurgicalBasedOnProductPurchasingVcSgOrBoth": null}},
"technicalData": {
"lastUser": "edie.belzner@alcon.com",
"linkedTable": "/root/account/Account" }}}'
"technicalData": {
"lastUser": "edie@hotmail",
"primaryKey": "AC|19"}}]},
"footer": {
"nb_records": 87
}}}],
"pagination": {"nextPage": "51943036/2"}}