MuleSoft_Misc Flashcards
Where are dataweave functions packaged in Mule?
Mule functions are packaged in Modules
What are the default functions that are imported in DataWeave scripts?
Functions in the core modules are imported automatically in Mule
What are the alternative solutions that can be used for functions with 2 parameters?
#[contains(payload, MAX)] #[payload contains "MAX"]
What is alternative syntax for the following expression?
sizeOf(filter(payload, (value) -> value.age > 30))
sizeOf(payload filter $.age > 30)
How is the following sequence of functions are executed?
flights orderBy $.price filter ($.availableSeats > 30 )
The last function in the chain is executed first filter and followed by orderBy.
Which function is used for removing duplicate data?
distinctBy
Which function is used to filter records?
Filter
Which function is used to order records on the basis of a key?
orderBy
How to add dash in place of space or any other parameter?
using dasherize function
How to call flows from a dataweave expression?
{a: lookup(‘myFlow’, {b: ‘Hello’})}
Inside lookup function first parameter is the flow name and the second parameter is the payload we want to send to the flow.
In Mule 4, All connectors are operation based and not transport based?
True
How Mule 4 connectors are more flexible?
- File connectors can read anywhere in the flow.
- Database connectors can query anywhere in the flow.
- JMS connector can consume anywhere in the flow.
How do we synchronize data from one system to another?
In data synchronization, initially we need to synchronize the initial payload and subsequent times we need to synchronize only new data.
How do we determine which data need to be synced up and when?
In the first sync store the timestamp and in the subsequent times check if the timestamp is greater than the previous timestamp.
What is a timestamp?
The timestamp is often a:-
1- Creation Timestamp
2- Modification Timestamp
3- Record ID
What are the types of watermarking in Mule?
There are 2 types of watermarking in Mule:-
- Automatic
- Manual
Watermarking option is available for which operations?
Automatic watermarking operation is available for the New and Updated file operation for the family of file connectors.
Watermark can be used to ensure if a file is new? What are the other options that can be used to ensure if a file is new?
Delete, move, filter