Create a Flow Using Gradle
Overview
The Gradle task hubCreateFlow can create a flow configuration file in the Hub Central format.
Learn more about the differences between the two formats: Learn more: About Flow and Step Configuration Structures
Before you begin
You need:
- Java JRE (OpenJDK) 8
- MarkLogic Server (See Version Compatibility.)
- Gradle 6.4 up to the latest 7.x release
Procedure
Results
View an example.
{
"name": "your-flow-name",
"description": "This is the default flow containing all of the default steps",
"batchSize": 100,
"threadCount": 4,
"options": {
"sourceQuery": null
},
"steps": {
"1": {
"name": "ingestion-step",
"description": "This is the default ingestion step",
"stepDefinitionName": "default-ingestion",
"stepDefinitionType": "INGESTION",
"customHook": {},
"fileLocations": {
"inputFilePath": "path/to/folder",
"outputURIPrefix": "output/URI,'substitute/URI'",
"inputFileType": "json"
},
"options": {
"targetDatabase": "data-hub-STAGING",
"sourceQuery": null,
"outputFormat": "json",
"collections": [
"default-ingestion"
]
}
},
"2": {
"name": "mapping-step",
"description": "This is the default mapping step",
"stepDefinitionName": "default-mapping",
"stepDefinitionType": "MAPPING",
"options": {
"sourceDatabase": "data-hub-STAGING",
"targetDatabase": "data-hub-FINAL",
"sourceQuery": "cts.collectionQuery('default-ingestion')",
"collections": [
"default-mapping",
"mdm-content"
],
"targetEntityType": "entity-name",
"mapping": {
"name": "mapping-name",
"version": 1
}
}
},
"3": {
"name": "mastering-step",
"description": "This is the default mastering step",
"stepDefinitionName": "default-mastering",
"stepDefinitionType": "MASTERING",
"options": {
"sourceDatabase": "data-hub-FINAL",
"targetDatabase": "data-hub-FINAL",
"targetEntityType": "entity-name",
"sourceQuery": "cts.andQuery([cts.collectionQuery('default-mapping'),cts.collectionQuery('mdm-content')])",
"collections": [
"default-mastering, mastered"
],
"mergeOptions" : {
"matchOptions" : "",
"propertyDefs" : {
"properties" : [ ],
"namespaces" : { }
},
"algorithms" : {
"stdAlgorithm" : {
"timestamp" : { }
},
"custom" : [ ],
"collections" : { }
},
"mergeStrategies" : [ ],
"merging" : [ ]
},
"matchOptions" : {
"dataFormat": "json",
"propertyDefs": {
"property": []
},
"algorithms": {
"algorithm": []
},
"collections": {
"content": []
},
"scoring": {
"add": [],
"expand": [],
"reduce": []
},
"actions": {
"action": []
},
"thresholds": {
"threshold": []
},
"tuning": {
"maxScan": 200
}
}
}
}
}
}