Using Gradle
- Last Updated: April 5, 2026
- 2 minute read
Run a Flow Using Gradle
Before you begin
You need:
- Java SE JDK 8
- MarkLogic Server (See Version Compatibility.)
- Gradle 4.6 or later
Procedure
-
Open a command-line window, and go to your project root directory.
-
At your project root, run the Gradle task
hubRunFlow.Unix systems
./gradlew hubRunFlow -PflowName=YourFlowName -PentityName=YourEntityName -PbatchSize=100 -PthreadCount=4 -PshowOptions=[true|false] -PfailHard=[true|false] -Psteps="1,2" -PjobId="abc123" [ -Poptions="{ customkey: customvalue, ... }" | -PoptionsFile=/path/to.json ] -iWindows
gradlew.bat hubRunFlow -PflowName=YourFlowName -PentityName=YourEntityName -PbatchSize=100 -PthreadCount=4 -PshowOptions=[true|false] -PfailHard=[true|false] -Psteps="1,2" -PjobId="abc123" [ -Poptions="{ customkey: customvalue, ... }" | -PoptionsFile=/path/to.json ] -iParameters
flowName
(Required) The name of the harmonize flow to run.
entityName
(Required if the flow includes a mapping step) The name of the entity used with the mapping step.
batchSize
The number of items to include in a batch. Default is 100.
threadCount
The number of threads to run. Default is 4.
showOptions
If
true, options that were passed to the command are printed out. Default isfalse.failHard
If
true, the flow's execution is ended immediately if a step fails. Default isfalse.steps
The comma-separated numbers of the steps to run. If not provided, the entire flow is run.
jobId
A unique job ID to associate with the flow run. This option can be used if the flow run is part of a larger process (e.g., a process orchestrated by NiFi with its own job/process ID). Must not be the same as an existing Data Hub job ID. If not provided, a unique Data Hub job ID will be assigned.
options
A JSON structure containing key-value pairs to be passed as custom parameters to your step modules.
optionsFile
The path to a JSON file containing key-value pairs to be passed as custom parameters to your step modules.
See Also
Previous topic: Create and Add a Step to a Flow Using Gradle
Related concepts
Related tasks
- Run a Flow Using QuickStart
- Run a Flow Using the Data Hub Java API
- Ingest Using MLCP
- Create a Flow Using Gradle
- Redeploy a Flow Using Gradle
Related reference