1
com.mulesoft.weave.model.structure.QualifiedName我有一個數據庫查詢,像這樣返回數據:Dataweave:獲取,而不是字符串
"LABEL","CONTAINER_ID","STATUS"
"14.JW24","1006063116","F"
"14.JW25","1006063116","F"
"1.JW2M","9999997","R"
"8.282","9999999","R"
"4.135","9999999","F"
"6.43","9999999","F"
"11.12","9999999","R"
"14.JW12","1006063073","R"
"14.JW13","1006063073","R"
"14.JW10","1006063068","F"
我使用Dataweave創建不同的列表具有「F」狀態的container_id值。喜歡的東西:
["1006063116", "9999999", "1006063068"]
這裏是我的dataweave腳本:
%dw 1.0
%output application/java
---
payload filter $.STATUS == "F" groupBy $.CONTAINER_ID pluck $$
,我得到com.mulesoft.weave.model.structure.QualifiedName對象的列表,而不是名單這工作,除了罰款字符串。
我該如何修改dataweave腳本才能獲取字符串,或者,如何從QualifiedName對象獲取字符串值?我試過在對象上調用toString()和getName()。前者不給我需要的價值,後者不起作用。
謝謝!我想添加爲:字符串,但由於某種原因,我認爲我需要首先將表達式包裝到parens中,這導致無效的語法。 – weissj