尝试使用Jolt插入当前日期/时间时需要帮助。
我尝试(如下所示)使用" $ {now()}" ;但是输出没有产生日期/时间。
JSON输入:
[
{
"ProdId": "Filler",
"ProductName": "Z Dry Filler",
"Trait": "",
"Variety": "",
"SuggestedRetailPrice": "0.0000",
"CropId": "",
"DeptId": "067001"
},
{
"ProdId": "Clay",
"ProductName": "Z Clay",
"Trait": "",
"Variety": "",
"SuggestedRetailPrice": "0.0000",
"CropId": "",
"DeptId": "067001"
}
]
Jolt Spec:
[
{
"operation": "default",
"spec": {
"*": {
"LastUpdated": "${now()}"
}
}
}
]
输出:
[ {
"ProdId" : "Filler",
"ProductName" : "Z Dry Filler",
"Trait" : "",
"Variety" : "",
"SuggestedRetailPrice" : "0.0000",
"CropId" : "",
"DeptId" : "067001",
"LastUpdated" : "${now()}"
}, {
"ProdId" : "Clay",
"ProductName" : "Z Clay",
"Trait" : "",
"Variety" : "",
"SuggestedRetailPrice" : "0.0000",
"CropId" : "",
"DeptId" : "067001",
"LastUpdated" : "${now()}"
} ]
期望输出:
[ {
"ProdId" : "Filler",
"ProductName" : "Z Dry Filler",
"Trait" : "",
"Variety" : "",
"SuggestedRetailPrice" : "0.0000",
"CropId" : "",
"DeptId" : "067001",
"LastUpdated" : "2018-03-06T15:38:19Z"
}, {
"ProdId" : "Clay",
"ProductName" : "Z Clay",
"Trait" : "",
"Variety" : "",
"SuggestedRetailPrice" : "0.0000",
"CropId" : "",
"DeptId" : "067001",
"LastUpdated" : "2018-03-06T15:38:19Z"
} ]
我不确定Jolt是否可以接受这些变量。
提前感谢您的任何帮助。