Mule-Dev-201 · Domain 6 of 12

Mule-Dev-201 Domain 6: Using Connectors

Using Connectors covers the Database connector with parameterized SQL, the File and FTP connectors for reading, writing and listing files, and patterns for retrieving data in the middle of a flow and combining it with the current payload.

Exam weight
10%
Official objectives
3
Estimated questions estimate
~6
Suggested study time estimate
6–8 hrs

About 11 min read Reviewed October 2026

Overview

Connectors are how a Mule application reaches the outside world. This section focuses on three families. The Database connector runs SQL through operations such as Select, Insert, Update, Delete and Stored Procedure, using a connection config for MySQL, Oracle, SQL Server, Derby or a generic JDBC driver. The File, FTP and SFTP connectors share a common set of operations, including Read, Write, List, Copy, Move and Delete, plus listeners that trigger flows on new or updated files.

The exam guide's three objectives ask you to apply the correct processors and syntax to connect to databases, to connect to files or FTP servers, and to retrieve and combine data in the middle of a flow, predicting outcomes in each case. That last objective links connectors to the event model: a call made mid-flow either replaces the payload or stores its result in a target variable, and DataWeave then merges the pieces.

How it's tested

Items describe a data source and a requirement, then show connector configurations or XML and ask what the payload contains afterwards or which setting meets the need. Some ask you to choose between operations, such as Read versus List, or between ways of passing values into a SQL statement.

  • Shape of the result

    You predict the payload type after Database Select, Insert, File Read or File List.

  • Safe SQL

    A query needs a value from the request, and you choose the input parameter syntax rather than string concatenation.

  • Combine sources

    A flow must add data from a second system to the current payload, and you choose target variables plus a DataWeave merge.

Reasoning it through

A flow receives an order with a customerId and must add the customer's email before sending it on. A Database Select with target customer and targetValue #[payload] stores the rows in vars.customer, keeping the order as payload. A Transform Message then outputs payload ++ {email: vars.customer[0].email}. Calling Select without a target would have replaced the order with the result rows, losing the data you needed to enrich.

Objectives 3

Official objectives from the Salesforce outline, in outline order.

6.1 Apply correct processors/syntax to connect to databases, and predict outcomes.Database config, Select and other operations, input parameters and result shapes.
What it means
A Database config defines the connection, such as a MySQL or Oracle connection with host, port, user and password from properties, or a generic connection with a JDBC URL and driver. Operations include Select, Insert, Update, Delete, Bulk Insert, Stored Procedure and Execute Script, plus listeners such as On Table Row.
What to understand
Write parameterized SQL like SELECT * FROM orders WHERE id = :id and pass values with Input Parameters, for example #[{id: attributes.uriParams.id}]. This protects against SQL injection and handles quoting. Select returns an array of objects, one per row, as a repeatable stream; even a single match is payload[0]. Insert, Update and Delete return statistics such as affectedRows and, for Insert, optionally generated keys. The JDBC driver must be added as a Maven dependency for the connection to work.
How it shows up
You pick the SQL and input parameter syntax for a request value, or predict the payload shape after Select.
Common confusion
Select returns an array even when one row matches, so payload.email is not the same as payload[0].email.
6.2 Apply correct processors/syntax to connect to files or FTP servers, and predict outcomes.File, FTP and SFTP operations, listeners and write modes.
What it means
The File connector works with the local file system, and FTP and SFTP work with remote servers, using the same operation set: Read, Write, List, Copy, Move, Rename, Delete and Create Directory. On New or Updated File listeners poll a directory and start a flow for each matching file.
What to understand
Read returns the file content as payload and file metadata as attributes, such as fileName and size. List returns an array of messages, each with its own payload and attributes, so you usually loop over it. Write has modes OVERWRITE, APPEND and CREATE_NEW, and its path can include an expression such as a timestamp. Listeners can move or delete processed files with moveToDirectory or autoDelete and can use a watermark to skip unchanged files. Relative paths resolve against the working directory set in the config.
How it shows up
You choose the operation and settings that read, write or archive files as described.
Common confusion
Write replaces the payload only when you expect it; in Mule 4 the Write operation does not return file content, so the payload stays as it was.
6.3 Apply correct processors/syntax to retrieve and combine data in the middle of a flow, and predict outcomes.Enrichment with targets, sequential calls and Scatter-Gather.
What it means
A flow often needs data from several sources at once, such as an order from the request, customer details from a database and stock from an HTTP API. You can call each source in turn with target variables, or call them in parallel with Scatter-Gather, then combine the results with DataWeave.
What to understand
With targets, each result is stored in its own variable and the payload stays as the original request, so a final Transform Message can reference payload, vars.customer and vars.stock. With Scatter-Gather, the result is an object keyed by route index, each holding a message, so payload['0'].payload reads the first route's body. Choose sequential calls when one call needs data from another, and parallel calls when they are independent.
How it shows up
A requirement to enrich the current payload leads you to choose targets or Scatter-Gather and the DataWeave merge.
Common confusion
Calling a connector without a target replaces the original payload, which is often the data you meant to enrich.

High-yield concepts

The terms, rules and formulas this domain turns into questions most often.

  • Database Select

    Runs a query and returns rows as an array of objects.

    Remember
    Even one row is payload[0].
    Tested as
    Result-shape questions.
    Trap
    Reading payload.field after Select.
  • Input Parameters

    Map of values bound to :name placeholders in SQL.

    Remember
    Prevents SQL injection and quoting errors.
    Tested as
    Safe query syntax questions.
    Trap
    Concatenating request values into SQL text.
  • Insert, Update, Delete results

    Return statistics such as affectedRows rather than records.

    Remember
    Insert can return auto-generated keys when configured.
    Tested as
    Predicting payload after a write.
    Trap
    Expecting the inserted row as payload.
  • JDBC driver dependency

    Database connections need the vendor driver added to the project.

    Remember
    Missing drivers cause connection test and deployment failures.
    Tested as
    Troubleshooting connector setup.
    Trap
    Assuming the connector includes every driver.
  • File Read

    Reads one file; payload is content, attributes are metadata.

    Remember
    Path relative to the working directory.
    Tested as
    Reading a known file.
    Trap
    Using List when content is needed.
  • File List

    Returns an array of messages for files in a directory.

    Remember
    Each element has payload and attributes.
    Tested as
    Processing many files.
    Trap
    Expecting just file names.
  • Write modes

    OVERWRITE, APPEND or CREATE_NEW.

    Remember
    CREATE_NEW fails if the file exists.
    Tested as
    Choosing safe writes.
    Trap
    Assuming APPEND is the default.
  • On New or Updated File

    Listener that polls a directory and triggers per file.

    Remember
    Use autoDelete, moveToDirectory or watermark to avoid reprocessing.
    Tested as
    File-triggered integrations.
    Trap
    Forgetting files can be read twice.
  • Target enrichment

    Storing a connector result in a variable to keep the payload.

    Remember
    Combine with DataWeave afterwards.
    Tested as
    Mid-flow retrieve and combine objective.
    Trap
    Overwriting the payload by omission.
  • Scatter-Gather result

    Object keyed by route index, each value a message.

    Remember
    Read bodies with payload['0'].payload.
    Tested as
    Parallel retrieval questions.
    Trap
    Expecting a flat array of bodies.

Side by side

Concepts candidates mix up, compared on the point that decides the answer.

File operations

ConceptMeaningKey differenceCommon trap
Read Returns one file's content and metadata Payload is content Using it to discover files
List Returns an array of messages for a directory Each item has payload and attributes Expecting only names
On New or Updated File Triggers a flow per file found by polling Event source, not an operation Reprocessing files without move or delete

Combining data mid-flow

ConceptMeaningKey differenceCommon trap
Sequential calls with targets Each result stored in a variable Supports dependent calls Omitting the target and losing the payload
Scatter-Gather Independent routes run concurrently Result keyed by route index Using it when one call needs another's output

Exam traps

Each trap is an answer that looks right. Learn the clue that should change your mind.

  1. Single row object

    What candidates pick
    payload.email after a Select that matches one row.
    Why it looks right
    Only one record matched.
    Why it's wrong
    Select always returns an array, so the value is at payload[0].email.

    Clue to watch for The question says the query returns exactly one row.

  2. Concatenated SQL

    What candidates pick
    A query built with ++ and a request value.
    Why it looks right
    It works in quick tests.
    Why it's wrong
    It exposes the database to SQL injection and quoting bugs; use :param with Input Parameters.

    Clue to watch for The value comes from a client request.

  3. List returns names

    What candidates pick
    Mapping List results as strings.
    Why it looks right
    Directory listings in other tools return names.
    Why it's wrong
    File List returns messages with content payloads and file attributes.

    Clue to watch for A loop over List output reads attributes.fileName.

  4. Write returns content

    What candidates pick
    Expecting the written file content as payload after Write.
    Why it looks right
    Many operations replace the payload.
    Why it's wrong
    Write does not return content, so the payload is unchanged after the operation.

    Clue to watch for A Logger after Write prints the payload.

  5. Default overwrite safety

    What candidates pick
    Assuming Write will not replace an existing file.
    Why it looks right
    Losing data seems unlikely to be a default.
    Why it's wrong
    OVERWRITE is the default mode; use CREATE_NEW to fail instead of replacing.

    Clue to watch for A requirement says never replace existing files.

Answer framework

Use these steps to answer connector configuration and result questions.

  1. Identify the system: database, local file system, FTP or SFTP server, or an HTTP API, and pick the matching connector config.
  2. Choose the operation by intent: Select or Read to fetch, Insert or Write to store, List to discover, a listener to trigger on new data.
  3. Pass request values through input parameters or expressions, never by concatenating them into SQL text.
  4. Decide whether the result should replace the payload or go into a target variable to keep the current data.
  5. Predict the result shape, such as an array of rows, file content with attributes, or statistics, and write the DataWeave that combines it.

Practice question

A flow receives POST /shipments with a JSON body. It must look up the warehouse address from a database using body.warehouseId, keep the original body, and send both to a carrier API. Which configuration best meets the requirement?

Choose one answer

Want more like this? The Mule-Dev-201 practice test has questions for every domain.

Checklist

0 of 10

Tick each one you can do without notes. Your ticks stay in this browser.

Study strategy

Set up a local database, such as MySQL in a container or the embedded Derby option used in MuleSoft training, and build flows that run Select, Insert and Update with input parameters. Log the payload after each operation so you see the array of rows and the statistics objects. Remove the driver dependency once to see the failure.

Then create a folder structure and practise the File connector: list a directory, loop over the result, read and write files with each mode, and set up a listener that moves processed files to an archive folder. If you can, repeat the main steps against an SFTP server to confirm that the operations behave the same way.

Finish with an enrichment exercise: take an HTTP request, look up related data in the database and from an HTTP API using targets, then do it again with Scatter-Gather. Writing the DataWeave to combine results in both styles covers the third objective and prepares you for Transforming Data.

FAQ

How many questions does Using Connectors account for on Mule-Dev-201?

Using Connectors carries 10% of the exam weight, about six of the 60 scored questions. Database and File or FTP items are the main focus.

Are Salesforce or SOAP connectors in scope?

The current objectives name databases, files and FTP servers, and retrieving and combining data mid-flow. Older outlines listed SOAP and JMS, so treat those as useful background rather than core topics.

Why should I use input parameters in SQL?

Input parameters bind values safely, which prevents SQL injection and handles quoting and data types. Concatenating request values into SQL is a classic wrong answer.

What does File List return in Mule 4?

An array of messages, one per file, each with the file content as payload and metadata such as fileName as attributes. You typically iterate over it with For Each.

Is SFTP different from FTP for the exam?

The SFTP connector uses the same operations as FTP and File, with a different connection config. Learn the shared operation set once and apply it to both.

How do I keep the original payload when calling a connector?

Set the operation's target to a variable name. The result goes into that variable, and the payload and attributes stay unchanged.

Other CRM & Business Applications certifications

Where the same subject shows up in other exams. Cards marked "Same subject" open the matching domain.

Test your Domain 6 knowledge

You have worked through Database, File and FTP connectors and mid-flow enrichment. See how well you predict connector results in Mule-Dev-201 practice questions.

Keep going