The Parallel Pipeline in Syncraft empowers developers to execute multiple pipelines concurrently. Unlike the Serial Pipeline, where each step waits for the previous one to complete, steps in a Parallel Pipeline run at the same time. This is particularly useful when there are independent data retrieval or transformation tasks that can be performed in parallel to optimize the overall execution time.
{
"collect": {
"documents": [
{
"query": {
"category": {
"includes": "Footwear"
}
},
"root": "Product",
"selection": {
"*": true
}
}
],
"sessions": [
{
"query": {
"id": {
"eq": 2
}
},
"root": "Users",
"selection": {
"id": true,
"name": true
}
},
{
"query": {
"Timestamp": {
"gt": "2023-09-13"
},
"UserID": {
"eq": {
"@ref": [
"id"
]
}
}
},
"root": "SessionRecord",
"selection": {
"ActionType": true,
"Category": true,
"ProductID": true,
"SubCategory": true,
"Timestamp": true,
"User": {
"@ref": [
"name"
]
}
}
}
]
},
"remap": {
"selection": {
"actions": {
"@ref": [
"sessions"
]
},
"documents": {
"@ref": [
"documents"
]
}
}
}
}
Product
root for documents related to "Footwear".Users
root and session data from the SessionRecord
root concurrently.Parallel Pipeline is indispensable in scenarios like:
The Parallel Pipeline in Syncraft allows developers to optimize query execution by running independent pipelines concurrently, making it a robust tool for handling complex, multi-source data retrieval, and transformation tasks in an efficient manner.