• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Dynamic query condition in tSalesForceInput

#1 2012-05-24 21:40:04

mlounas
New member
Registered: 2011-06-13
Posts: 9

Dynamic query condition in tSalesForceInput

Dear All,

I need to set a where clause with a dynamic variable in query condition of a tSalesforceInput component.

I got a "MalformedQueryFault" error when i execute my job.

The query condition is the following:

"select Id,OwnerId,Email,Salutation,MailingPostalCode,Birthdate
,MailingState,Description,HasOptedOutOfEmail,DoNotCall
,LastName,MailingCountry
,FirstName,MailingStreet,Fax,Phone,MobilePhone,Title, MailingCity from Contact
where Id= '" +(String)globalMap.get("ContactId")+ "' "

I have set the following globalmap to store the ContactIds in a tJavaRow, i don't know if this is possible:

globalMap.put("ContactId", input_row.ContactId);    (input_row.ContactId is a result of tMap branch which mapping data coming from a csv file)

All the best,

Anzar

Last edited by mlounas (2012-05-24 23:21:32)

Offline

#2 2012-05-25 05:50:11

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Dynamic query condition in tSalesForceInput

Hi Anzar

Try to give a fixed value of Id and test whether you still get this error.
I guess the query may be against the structure of Contact.

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-05-25 08:33:26

mlounas
New member
Registered: 2011-06-13
Posts: 9

Re: Dynamic query condition in tSalesForceInput

Thanks, the query is against Contact structure. This works with a fixed ContactId. My need is to query some contacts coming from a external source, and decide whether to make an update on SFDC.

Anzar.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Dynamic query condition in tSalesForceInput

Board footer

Powered by FluxBB