0
votes

I have a huge list of Ids and Names for Contacts defined in this simple DW script. Let's show just two for simplicity:

[
{id:'169057',Name:'John'},
{id:'169099',Name:'Mark'}
]

I need salesforce connector to execute a single query (not 1000 unitary queries) about this two fields.

I expect the connector to be able to use a List of Maps as input, as it does using update/insert operations. So, I tried with this Connector config: enter image description here

I am getting as response a ConsumerIterator. If I do a Object to String transformer but I am getting an empty String as response.

I guess must be a way of executing a big query in just one API call... But I am not finding it. Have in mind I need to use two or more WHERE clauses.

Any idea? Thanks!

2

2 Answers

0
votes

I think you need to create two separate list for id and Name values from your input and then use those list in the query using IN.

0
votes
  1. Construct id list to be used in where clause. This can be executed inside for each with batch size 1000.

  2. Retrieve name and id from contact for each batch

    select id, name from contact where id in (id list)

  3. Get the desired id's by matching name retrieved in step 2 within mule.