Forum Discussion

akarsh's avatar
akarsh
New Contributor III
2 years ago
Solved

Create Key: Pair value in mapper

Input Structure
[
{
"Id": "ABC",
"IFA_Number__c": "1"
},
{
"Id": "BCD",
"IFA_Number__c": "2"
}
]

I have to save this data in a key value format ( Ifanumber is key and ID is value) so that later in mapper I have to fetc fetch the respective ID based on IFA number. what's best way to do this?

  • Hello akarsh,

    You can try with grouping all of the documents into a single array, then using reduce to combine them in one object.

    Please note that if you have duplicate keys through the documents, they will overwrite.

    Please refer to the attached pipeline and let me know if this helps you.

     

    Regards,

    Aleksandar.

  • You can try with the following expression:

    $dataList.map(x => x.get('IfaNumber',null)).filter((x,ind,arr) => x != null && arr.indexOf(x) == ind)

    Let me know if this helps.

    Regards,

    Aleksandar.

11 Replies

  • christwr's avatar
    christwr
    Contributor III

    The load balancer would be to select which groundplex node to submit the initial request to. You don’t want to always point to some specific node, as it may be down at any given point for maintenance, etc. The load balancer would send to one of the groundplex nodes that are actually up and accepting requests.

    To provide redundancy across all nodes in the Groundplex when a triggered task is invoked, a load balancer can be placed in front of the Groundplex nodes

  • ram3's avatar
    ram3
    New Contributor

    @tlikarish @cjhoward18 Thank you for this blog post. My understanding is, if we use the Cloud URL then there is no need to setup the “GP_LB” right ? I am saying this because, Control plane has the information of which node is available and least loaded (has resources) to run the task & also has information of whether the task is already cached in the node.

    Additionally, do you discourage the triggering of tasks using Cloud URL for security reasons ? If so, how to disable the CloudURL. Thanks in advance