dataweave interview questions

Most frequently asked DataWeave Interview Questions
  • What is MuleSoft?
  • What are the various types of variables used by MuleSoft?
  • What are the message types in MuleSoft?
  • What is the meaning of DataWeave?
  • What is p() used in DataWeave?
  • How can we invoke or call flows from DataWeave?

DataWeave Interview Question Using Map and Reduce

Interviews for Top Jobs at DataWeave

Inside Sales Executive Interview


I applied online. The process took 6 days. I interviewed at DataWeave in Jan 2022


Interview was with the VP of Sales. Typical interview for a IT sales sessional professional. They expressed their requirement genuinely like what exactly they are looking for in a candidate.

Interview Questions

  • What is your 30 days|60 days| and 90 days plan if you take this job position?

Data Engineering Interview


I applied online. The process took 2 days. I interviewed at DataWeave (Bangalore) in Nov 2018


The process was smooth, the interview started on time. Question were asked related to data structure and needed to write pseudo code. Some programming question were also asked and needed to implement it in optimal complexity.

Interview Questions

  • Tell me about Yourself ?

Lead Data Scientist Interview


I applied online. The process took 3 weeks. I interviewed at DataWeave in Dec 2021


I had 3 rounds: Introductory call, Technical Interview, and Technical Assignment. After submitting the assignment, I didn’t get any response at all. They might be using the assignments for completing their short-duration tasks.

Interview Questions

  • The Technical interview revolved around NLP and CV problems.For the assignment, there were two questions. Build an API for image similarity and build an API to tag product titles with different attributes. The tagging problem also had a set of titles to be tagged and sent back. The time limit was 2 days.

Use Pluck operator which iterate over an Object and return an array of keys, values, or indices from the object. More info –

How you will parse an XML with or without namespace in Dataweave? How you will retrieve the attribute value

mapObject – Iterates over an object using a mapper that acts on keys, values, or indices of that object.

From the functionality wise both are same but both work on different input and return different output, where array and object are Java array and Java object.

You can use Dataweave lookup function to call flow from inside a Dataweave It works in Mule apps that are running on Mule Runtime version 4.1.4 and later. It takes the flow’s name and an input payload as parameters. For example, lookup(“flowname”, payload)

Subscribe to our youtube channel to get new updates..!

The application needs of a project must be analysed carefully for avoiding unnecessary arrangements. ESB benefits the project needs in several ways by operating it on a huge setup of multifunctional application support. The analysis depends on many factors such as.

  • When a project needs a group of actions for additional applications and servers where the interaction happens between two or more complex resources.
  • When a project requires communication for multiple applications over a single setup during a broad scale-up for the future scope.
  • When the project requires to route the messages from one end to other such as forking and aggregating the routing messages.
  • When a project needs application support that requires huge investment.
  • When you need a new file inbound endpoints to poll direction for reading the new content then you must set the polling frequency value to few milliseconds to achieve this. Here polling frequency defines the value of the poll.

    Mule ESB (a.k.a. Mule) is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more.

    Shared Context: Context is a temporary area which is created along with Service Message Object (SMO) in the Mediation Flows. Shared Context is a type of context which is present in the SMO. Shared Context is mainly used when we are using Aggregation process where we need to iterate the BO for Certain times. Shared Context maintains Aggregation data between Aggregation primitives. The Content (data) which is present in the shared context BO does not persist across Request and Response flows i.e. The Data in the Shared Context which is used in Request flow cannot be used again in Response flow.

    Correlation Context: Used when Mediation primitives want to pass values from the request flow to the response flow.

    Used to pass values from the request message onto the response.

    By using Fan-in and Fan-out primitive.

    We have future called Promotable properties in ESB. We can configure this future while development. Then we can make it changed at runtime without restarting the server it can be published.

    If you are getting this error message while building the Mule examples:

    [WARNING] Unable to get resource from repository atlassian-m2-repository (


    [WARNING] Unable to get resource from repository atlassian-m1-repository (


    [WARNING] Unable to get resource from repository Codehaus (


    The issue regarding dependencies review is tracked at MULE-1446.

    Add the following code snippet to your Mule configuration:

    Ensure the HQ agent is running on the server the Mule instance is configured on and is pointing to the desired HQ server.

    Check the Mule HQ server page to see if information about the Mule instance is being received.

    A Mule UMO is a Universal Message Object

    UMO is now a legacy term. What was once referred to as UMO Components are now referred to as Service Components?

    The java and mule environment variables must be setup correctly for mule to start. If you are experiencing problems check the following variables:

    Check all of the above carefully. Some systems with multiple JDK’s installed can end up with incorrect mappings between the PATH and the JAVA_HOME, which will stop mule from loading.

    Use the MULE_LIB variable (generally set in the run script)

    To include JAR file(s) in a mule class path, declare each dependent jar file in the MULE_LIB entry.

    For spring resource, if the XML bean declaration is placed within a project, include the project JAR file in the class path too (i.e., if not included, Mule will throw a **.xml not found on class path)


    Ftp get to a remote server and place into a local directory on the MULE server

    This is in 1.4/1.4.1 distributions but was missing from the 1.3.3 distribution – the class is defined in /lib/mule/mule-core-.jar.

    Our design of course tutorials and interview questions is practical and informative. At TekSlate, we offer resources to help you learn various IT courses. We avail both written material and demo video tutorials. For in-depth knowledge and practical experience explore online mule ESB Training.

    Messaging framework to an enterprise-wide highly distributable object broker.

    Transport: applications can accept input from a variety of means, from the file system to the network.

    Data format: speaking the right protocol is only part of the solution, as applications can use almost any form of representation for the data they exchange.

    Invocation styles: synchronous, asynchronous, or batch call semantics entail very different integration strategies.

    Lifecycles: applications of different origins that serve varied purposes tend to have disparate development, maintenance, and operational lifecycles.

    Mule’s core was designed as an event-driven framework combined with a unified representation of messages, expandable with pluggable modules. These modules would provide support for a wide range of transports or add extra features, such as distributed transactions, security, or management. Mule was also designed as a programmatic framework offering programmers the means to graft additional behavior such as specific message processing or custom data transformation.

    There is a lot of infrastructure work to be done before we can really start thinking about implementing any logic. So this infrastructure work is regarded as “donkey work” as it needs doing for every project. A Mule is also commonly referred to as a carrier of load, moving it from one place to another. The load it specializes in moving is our enterprise information.

    Explore Mulesoft Sample Resumes! Download & Edit, Get Noticed by Top Employers !Download Now!

    Prescriptive deployment model, whereas Mule supports a wide variety of deployment strategies. Prescriptive SOA methodology, whereas Mule can embrace the architectural style and SOA practices in place where it is deployed. Mainly focused on higher-level concerns, whereas Mule deals extensively with all the details of integration. Strict full-stack web service orientation, whereas Mule’s capacities as an integration framework open it to all sorts of other protocols. Comprehensive documentation, a subject on which MuleSource has made huge progress recently

    The first logical layer is the model layer. A Mule model represents the runtime environment that hosts services. It defines the behavior of Mule when processing requests handled by services. The model provides services with supporting features, such as exception strategies. It also provides services with default values that simplify their configuration.

    A Mule service is composed of all the Mule entities involved in processing particular requests in predefined manners. A service is defined by a specific configuration. This configuration determines the different elements, from the different layers of responsibility that will be mobilized to process the requests that it will be open to receive. Depending on the type of input channel it uses, a service may or may not be publicly accessible outside of the ESB.

    The transport layer is in charge of receiving or sending messages. This is why it is involved with both inbound and outbound communications. A transport manifests itself in the configuration by the following elements: connectors, endpoints and transformers.

    A transport also defines one message adapter. A message adapter is responsible for extracting all the information available in a particular request (data, meta information, attachments, and so on) and storing them in transport-agnostic fashion in a Mule message.

    A connector is in charge of controlling the usage of a particular protocol. It is configured with parameters that are specific to this protocol and holds any state that can be shared with the underlying entities in charge of the actual communications.

    For example: a JMS connector is configured with a Connection, which is shared by the different entities in charge of the actual communication.

    A Batch Aggregator in MuleSoft will add a collection of data until it reaches the Nth record. The collected data consists of records called payload, the payload of mule messages processed by the Batch Aggregator processor.

    It is a unit of computing capability used in processing on the cloud hub. In a single vCore, a maximum of 10 applications can be deployed, and each mule programme will consume 0.1 vCore.

    Dataweave is a functional programming language which transforms data. It is a simple and powerful tool in mulesoft, and it has various functions like command tool and mapping fields graphically.

    Bandwidth between instances in peering VPCs is the same as bandwidth inside the same VPC.

    To deploy the Mule app by using any one of the deployment options which Anypoint Runtime Manager supports.

  • On-premise
  • Runtime Fabric (RTF)
  • Anypoint PCF (Anypoint Platform for Pivotal Cloud Foundry)
  • Anypoint PCE (Anypoint Public Cloud Edition)
  • AnyPoint exchange is the marketplace for connectors, templates, examples, and APIs it allocates and integrates assets and resources into apps. Anypoint platform provides you with a single point solution. Anypoint exchange offers many services, including exchange, API data gateway, and runtime manager.

    Zero message loss in MuleSoft is considered as Reliability. This is achieved by designing the application to capture the state of a running instance, or a process whis is taken up by another running node in the cluster. Reliable messaging provided by in-built support of transactions in transport. Applications may use the virtual machine (VM), Java Message Service(JMS), Database (DB), etc.

    Subflows are a series of reusable actions which are used in a flow. Developers are free to create subflows to perform traditional methods to a specific application. Subflow inputs are present in subflow, which passes the variables to actions. Subflows provide better performance than referring to a flow, and Subflows do not contain event sources.

    Messages in mulesoft are composed in four different segments they are :

  • Payload – The Mule message is the data that passes through an application via one or more flows. It consists of two main parts, and this is the primary context of data carried by a given message. It contains business-specific data.
  • Properties – it is like a SOAP message and contains meta-information or header.
  • Multiple Name Attachments – it provides assistance to multi-part messages.
  • An exceptional payload – it will hold errors that occur during the processing of the event.
  • PCE is the Platform Private Cloud Edition of Anypoint Platform, often referred to as (Anypoint Platform PCE). With the help of PCE, you can run and manage Mule applications on local servers by using security policies. You dont need to know about Docker or Kubernetes to install PCE.

    There are many different types of primitives in mediation.

  • Message Filter
  • Type Filter
  • Endpoint Lookup
  • Service Invoke
  • Fan-out
  • Fan-in
  • XSLT
  • BO Map
  • Message Element Setter
  • DB lookup
  • Data Handler
  • Custom Mediation
  • Header Setters
  • Message Logger
  • Even Emitter
  • Stop
  • Fail
  • Sub Flow
  • There are five types of Exception Handling in MuleSoft.

  • Global Exception Handling.
  • Catch Exception Handling.
  • Choice Exception Handling.
  • Default Exception Handling.
  • Rollback Exception Handling.
  • In this article, we provided you with interview questions for mulesoft. These are some of the commonly asked questions in an interview prepared by our subject expert. Questions are designed so that a beginner, experienced and working professional can understand the question and answers. Those preparing for the Mulesoft interview can prepare questions that will help you answer the questions in the interview. You can subscribe to our one-to-one interview sessions and gain confidence. Please stay connected with us for more knowledgeable and reliable content. We at HKR will strive to provide genuine content for our readers.

  • Batch starts on 24th Sep 2022, Weekend batch
  • Batch starts on 28th Sep 2022, Weekday batch
  • Batch starts on 2nd Oct 2022, Weekend batch
  • Most Frequently Asked MuleSoft Interview Questions

    MuleSoft is a cluster-based solution provider that integrates with Data, Applications, and APIs on-premises over the cloud platform. It works on “AnyPoint Connectivity Model” which connects existing SaaS-based applications or set of APIs through one single API interface. It is flexible in accessing all the required applications with this integration support that is based on service-oriented architecture. MuleSoft runs the programmable web portal for building web, mobile and other user applications.

    Interested in learning Mulesoft Course ? Enroll in our Mulesoft Training program now!

    The Mule ESB is an integration platform based on ESB java that enables the developers to quickly connect the applications and exchange the data. It integrates with the existing system irrespective of the technologies which the applications use such as Web Services, HTTP, JDBC, JMS etc.

    It is used in passing the required values within the existing flow. The flow can be either a requesting flow or a responding flow. Transient flow is not used across since it will not make the link requests or responses together. It will not be used in saving an input message before service gets invoked into request or response flow. In general the transient acts as temporary storage of messages. After service invokes a call, the next primitive creates another message by combining the invoking response and the original message that is stored in the Transient Context.

    SOAP services are created in a similar fashion as that of creating a Mule project by using RAML. The difference is that Concert WSDL is imported instead of RAML and SOAP services are consumed by using Web Service consumer or Mule flow CXF components.

    Service Invoke: This primitive is used in making the service request either a request or response of a mediation flow. The service can be a request/response or a one-way. A series of service invocations are performed after permitting the multiple instances of a service invoke primitives in a flow.

    Callout: The callout receives the message and calls the requested service and operation. For each connected target operation, there will be a callout node in the median flow.

  • When the call is successful, the callout response node in the response flow receives a response message
  • When the call is unsuccessful, the callout will be set to retry service invocations depending on the type of fault received.
  • Mule ESB is a lightweight and highly scalable integration framework which enables the developers to start and connect various applications. The Mule manages the exchange between the components, applications transparency and ESB is taken care of by various applications. Mule can easily integrate third-party applications.

    Fan-out: The Fan-Out primitive is used to fire the output terminal once or multiple times. Fan-Out can be used in isolation or as a combination of Fan-Out and Fan-In.

    Fan-in: The Fan-In acts as a decision point to continue the flow execution. Until a decision point is reached it receives a number of messages, at which point the last message to be received is propagated to the output terminal. The Fan In primitive can be used in combination with Fan-Out

    An ESB follows a service-oriented approach and is used in the purpose of integration. The features include.

  • Message Routing Service.
  • Message Transformation Service.
  • Set of Service Container.
  • Web Service Security.
  • The configuration of JDBC adapter is not a complex task, it just needs a data source to connect and configure with a database. A security authentication program must be created if the DB has secure access.

    SDO: It is a Service Data Object which represents a variable or an object.

    SMO: It is a model pattern that is used for SDO Data Objects to represent messages.

    It is used to stop the particular path inflow without generating any exception.

    Fail: Generates a failure in the flow.

    There are three different types of mule variables.

  • Record variable.
  • Session variable.
  • Flow variable.
  • ESB Integration has four core principles.

  • Transportation – Transport protocol negotiation between different formats including JMS, JDBC, HTTP, etc.
  • Transformation – Data transformation between the data formats as required by every individual ESB connector.
  • Non-functional consistency – Applying the consistent implementation of monitoring and security policies.
  • Mediation – As the name suggests which involves offering different interfaces.
  • Enabling different channels for the same unlying implementation of components.
  • Support for backwards compatibility with different service versions.
  • Properties – It contains the header or meta-information or header similar to SOAP.

    Payload – It is the main data context carried by a particular message.

    Multiple name attachments – Provides the support for multiple messages or payload during event processing.

    Echo and Log message: These are log messages and it moves from inbound to outbound routers.

    Bride Message: It is a passed message from inbound to outbound routers.

    Build Message: These are messages which are created from fixed or dynamic values.

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning
  • ESB provides the middleware and interfaces services which allow the business enterprises to connect their applications without writing any code.

    JMS provides the communication facility and messaging capability between the modules of an application.

    The related parameters which are used to configure a scheduler are:

    Frequency – These are frequencies used by scheduler for triggering flows.

    Start Delay – It is the waiting time that is used before triggering any flow.

    Time Unit – The time unit for frequency and start delay.

    A mule data integrator is a tool that maps data by visualizing it. It offers a drag and drop feature interface which makes the developers code easily.

  • A perfect medium for web services to talk with client applications.
  • Being a lightweight protocol it can be used for data exchange between applications.
  • The SOAP protocol works on any programming languages based on Windows and Linux platforms.
  • Customization is not required to run the web services built on the SOAP protocol for working on WWW.
  • The configuration patters of MuleSoft are:

  • Bridge
  • Validator
  • WS proxy
  • Simple service pattern
  • HTTP proxy
  • The characteristics are:

  • The global endpoint is not typified or outbound routing.
  • It is used in configuration files at different locations.
  • The global service name is applied for referring to the endpoint.
  • It helps in clarifying the usage of particular destinations.
  • The Outbound Endpoint performs the following things:

  • Sending the SOAP messages.
  • Writing to file streams.
  • Sending email messages.
  • There are different ESBs available in the market which is both licensed and open source. They are:

  • JBoss Fuse.
  • ESBMule.
  • ESBTalend.
  • There are six categories in Mule Processors.

  • Components.
  • Exception strategies.
  • Business events.
  • Routers.
  • Connectors.
  • Transformers.
  • The supported languages of MuleSoft are:

    The benefits are:

  • This core component can be added by users anywhere in the workflow.
  • It can be configured for any combination of strings and expressions.
  • The advantages are:

  • It provides a high-level control facility from the portal based on the web.
  • By using SaaS-based applications, ESB provides numerous connectivity options.
  • ESB provides API and Analytical management.
  • ESB is equipped with numerous facilities which can fix the bugs and automates testing.
  • Integration of EDI (Electronic Data Interchange)/B2B (business to business).
  • Supports batch integration by applying real-time integration methods.
  • The strategy types in flow processing are:

  • Non-blocking flow processing
  • A queued asynchronous flow processing
  • Asynchronous flow processing
  • Custom flow processing
  • Tread per processing
  • Synchronous flow processing
  • Queued flow processing
  • The configuration builder in mule helps in transferring the human organized configuration file into complex graph objects that substitute a running node in ESB. There are two types of configuration builder.

  • Spring Driven Builder – works with XML files.
  • Script Builder – accepts scripting languages files.
  • To make the connectors as reusable components, it must be first defined as a common resource and then to expose all the applications that have been deployed under the same domain. These are called shared resources. It must be defined inside the Mule Domain Project and has to be referred to every project that is intended to incorporate the elements in it.

    By default, the auto-delete feature value is zero which means an inbound endpoint deletes the file automatically from the source directory. If the source directly files doesn’t need any auto-delete then the value must be set to false.

    We have the perfect professional Mulesoft Tutorial for you. Enroll now!

    A batch job is an element in a mule which splits large messages into records and processes asynchronously in a batch job.

    Scatter-Gather Router is a routing event processor which can send the request messages for more than one target concurrency. The Scatter-Gather Router will then collect responses from all routes and aggregate back into one response.

    Choice Router is a dynamic router which routes the messages inflow. The message content is evaluated based on a set of DataWeave expressions.

    VM transport is a special type of transport which sends the messages via memory. When a Mule instance runs then messages will never leave JVM.

    Message sources are Anypoint connectors, connectivity elements to a specific external source via standard protocols such as HTTP, FTP, SMTP or a third-party API such as, Twitter or MongoDB.

    The payload is a runtime variable in MuleSoft which stores arrays or objects. It is wrapped under the “mule.api.MuleMessage” library which helps in getting different means of accessing payloads under different forms. Mule messages are similar to SOAP, JMS messages which have containers properties, header and multiple names attached to it. The main content of the message is called Payload.

    Mule Transformer is an event instance of “org.mule.api.MuleEvent” library. This object carries the actual context of the message with the context of the event. The main purpose is to translate a message from one form to another. It can also create a chain of transformers. The message transit occurs between one medium to another medium while staging into different services.

    It is a technical hidden configuration that is used in each instance of a connector. It provides the definitions to parameters such as the use of particular parameters, classes which are required for a particular message receiver, dispatchers and requests. These definitions are the default transformations which are used inbound or outbound and utilizing the response of the router.

    An endpoint is a destination shared by many routers in a group which also helps in creating a global endpoint. The global endpoint is useful in different places in the configuration file but it is not similar for inbound and outbound routing services. The entire endpoint names must be specified during the services. These names identify the global endpoint in the group of routers. The global endpoint offers the usage clarification for a specific destination.

    The router is a critical service in MuleSoft. It finalises and assigns the running territory for the messages to move from one service to another. The routing is a transitory control processing decided by the router which transits the message from one source to another. It is also called as a gatekeeper of endpoint services. It tracks the targeted successions to ensure message delivery on the right intended destination. Routers act as a bundle of classified tasks such as split, sort, group or regroup, messages based on specified conditions or certain mappings.

    Filters are the powerful capabilities for routers that help in making the smart decision on message delivery or request and response environment. It also provides insights to the router for deciding what to do with the messages in the transit stage. Few filters analyse the messages deeply to find the actual value for desired outputs.

    Endpoint defines the specific usage of a transport protocol in reading the message, writing, listening or polling to the target destination. The endpoint control entity ensures the usability of connectors. The target destination will be defined as a URI that depends on connectors which treat the destination as URI, URL or JMS.

    Fileage defines the duration of waiting time of an endpoint that starts before reading the file again. For example, file age of 60000 indicates an endpoint that has to wait for 1 minute before the start for the next processing.

    Streaming properties represent the format of true and false values in connectors. You will be working with the streaming data on the connecters if the streaming value is true else you will work on the file system if it’s false.

    In general, the context of a message defines the overall purpose of the message but the context of mule defines the temporary area that is created along with SMO (Server Message Object) in median flow while message transit. SMO contains shared context in the message flow that is used at the time of aggregation. The context of aggregation maintains the data between FanOut and FanIn primitives. The context of data which is present in the request flow is not persistent in the throughout request and responses flow as it belongs only to a request BO.


    What is $$$ in DataWeave?

    The $ symbol can be used for accessing the value of a key-value pair in a map. $$ can be used for getting the key (or index) of the key-value pair.

    What is DataWeave used for?

    DataWeave allows users to easily perform a common use case for integration developers: read and parse data from one format, transform it, and write it out as a different format. For example, a DataWeave script could take in a simple CSV file and transform it into an array of complex JSON objects.

    What does the zip operator do in DataWeave?

    It uses these DataWeave functions: map to go through the elements in the main array. zip to rearrange pairs of long arrays, so that they’re grouped by index into multiple two-element arrays.

    How do I get current date in Mule DataWeave?

    you can use now for getting current date and operate on it as you want. You can use `now` in dataweave.

    If you want to add month or day you can use below code:
    1. %dw 2.0.
    2. output application/json.
    3. {
    4. Day: now() + |P1D|,
    5. Month: now() + |P1M|
    6. }

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *