ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 142 - MCD - Level 1 discussion

Report
Export

Which keyword do you use to create a new function in DataWeave?

A.
function
Answers
A.
function
B.
fun
Answers
B.
fun
C.
func
Answers
C.
func
D.
map
Answers
D.
map
Suggested answer: B

Explanation:

You can define your own DataWeave functions using the fun declaration in the header of a DataWeave script. Sample is as below. ----------------------------------------

%dw 2.0

output application/json

fun toUpper(aString) = upper(aString)

---

toUpper('hello')

MuleSoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.1/dataweave-functions

asked 18/09/2024
Joseph McCray
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first