Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam MCD - Level 1 All Questions

View all questions & answers for the MCD - Level 1 exam

Exam MCD - Level 1 topic 1 question 134 discussion

Actual exam question from Mulesoft's MCD - Level 1
Question #: 134
Topic #: 1
[All MCD - Level 1 Questions]

A Mule project contains a DataWeave module file WebStore.dwl that defines a function named loginUser. The module file is located in the project’s src/main/resources/libs/dw folder.

What is correct DataWeave code to import all of the WebStore.dwl file’s functions and then call the loginUser function for the login “[email protected]”?

Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Alandt
9 months, 3 weeks ago
Selected Answer: C
ChatGPT: C. import * from libs::dw::WebStore --- loginUser( “[email protected]” )
upvoted 1 times
...
ExamDev
10 months ago
Example: Importing and Using a Custom DataWeave Module %dw 2.0 import modules::MyModule output application/json --- MyModule::myFunc("dataweave") ++ "name" Here we are talking about custom modules!
upvoted 1 times
ExamDev
10 months ago
The way you import a module impacts the way you need to call its functions from a DataWeave script. If the directive does not list specific functions to import or use * from to import all functions from a function module, you need to specify the module when you call the function from your script. For example, this import directive does not identify any functions to import from the String module, so it calls the pluralize function like this: Strings::pluralize("box").
upvoted 1 times
...
...
[Removed]
1 year, 6 months ago
Selected Answer: C
Looks like C https://docs.mulesoft.com/dataweave/2.4/dw-functions
upvoted 2 times
...
hahahe234
1 year, 8 months ago
I agree with C
upvoted 1 times
...
Ranjansingh
1 year, 9 months ago
Selected Answer: C
The wild card import lead to import all functions from the .dw file and no need to refer the file again.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...