[FastData] SVC advanced mapping with file #536
-
What product are you having troubles with?Fast Data What Console version are you using?12.3.4 DescriptionHello, I have a SVC with an advanced aggregation that looks like this: {
...
"mapping": {
"categoryId": "__fromFile__[getCategoryId.js]",
"networkCode": "__fromFile__[getNetworkCode.js]",
"lastNotificationId": "__fromFile__[getLastNotificationId.js]",
...
} The real aggregation has more than 10 fields, each custom file calls a function that performs query on the DB, the query is always the same: module.exports = async(logger, mongoDbClient, notificationRaw, category) => {
const [lastDoc] = await mongoDbClient.collection('NOTIFICATIONS_RAW')
.find(filter, { sort: { PUBLICATION_DATE: -1 }, limit: 1 })
.toArray()
return lastDoc
} Is it possible somehow to perform the query on the DB only one time and use the result across all the fields? Thanks! Actual OutcomeNo response Expected OutcomeNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Currently, the existing aggregation configuration does not allow the SVC to run a single query on the DB for the use case described. This is something that we will not address. In any case, we thank you for the feedback, which makes us aware of some adoptable configuration patterns and helps us improve the performance of the Fast Data product. |
Beta Was this translation helpful? Give feedback.
Currently, the existing aggregation configuration does not allow the SVC to run a single query on the DB for the use case described. This is something that we will not address. In any case, we thank you for the feedback, which makes us aware of some adoptable configuration patterns and helps us improve the performance of the Fast Data product.