Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在尝试编写条件表达式,而不是在数据编织中使用 when。我不知道如何实现这一目标。
我正在尝试编写如下所述的内容来过滤语句中的条件:
%dw 1.0 %output application/java --- { data: payload, paylo: (sizeOf payload) < 20 ? 90:0 }
以下代码将帮助您应用条件
%dw 1.0 %output application/java --- { data: payload, paylo: 90 when sizeOf payload < 20 otherwise 0 }
该文档应该可以帮助您理解sizeOf和条件语句