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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Alandt
3 months, 1 week ago
Selected Answer: C
ChatGPT: C. import * from libs::dw::WebStore --- loginUser( “[email protected]” )
upvoted 1 times
...
ExamDev
3 months, 3 weeks 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
3 months, 3 weeks 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]
12 months ago
Selected Answer: C
Looks like C https://docs.mulesoft.com/dataweave/2.4/dw-functions
upvoted 2 times
...
hahahe234
1 year, 2 months ago
I agree with C
upvoted 1 times
...
Ranjansingh
1 year, 3 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 ...