One Star

soap SQL syntax : INVALID_QUERY_FILTER_OPERATOR

Hi,
I'm configuring a Salesforce (SF) comppnent in talend and wish to filter the records from SF before pushing the results to a file
Here is the syntax I'm using to pull the data from SF
"SELECT ReportsToId, FirstName, LastName, Title, Name, Email, Department, MailingStreet, MailingCity, MailingState, MailingCountry, MailingPostalCode, Phone, Fax, Description FROM Contact WHERE ReportsToId like 'Jess*'"
It's that - WHERE ReportToId like 'Jess*' - that causes the issue. (It works fine without it.)

Here's then the message I get back in the stats on trying to run the component.
Thanks for looking at the post.
Cheers. Ed


Starting job ICON_Dataset3 at 14:39 28/01/2010.
connecting to socket on port 3449
connected
Exception in component tSalesforceInput_1
AxisFault
faultCode: {urn:fault.partner.soap.sforce.com}INVALID_QUERY_FILTER_OPERATOR
faultSubcode:
faultString: INVALID_QUERY_FILTER_OPERATOR:
Description FROM Contact WHERE ReportsToId like 'Jess*'
^
ERROR at Row:1:Column:194
invalid operator on id field
faultActor:
faultNode:
faultDetail:
{urn:fault.partner.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>INVALID_QUERY_FILTER_OPERATOR</ns1:exceptionCode><ns1:exceptionMessage>
Description FROM Contact WHERE ReportsToId like 'Jess*'
^
ERROR at Row:1:Column:194
invalid operator on id field</ns1:exceptionMessage>
INVALID_QUERY_FILTER_OPERATOR:
Description FROM Contact WHERE ReportsToId like 'Jess*'
^
ERROR at Row:1:Column:194
invalid operator on id field
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
at com.sforce.soap.partner.fault.UnexpectedErrorFault.getDeserializer(UnexpectedErrorFault.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sforce.soap.partner.SoapBindingStub.query(SoapBindingStub.java:3052)
at datasets.icon_dataset3_0_1.ICON_Dataset3.tSalesforceInput_1Process(ICON_Dataset3.java:1257)
at datasets.icon_dataset3_0_1.ICON_Dataset3.runJobInTOS(ICON_Dataset3.java:2028)
at datasets.icon_dataset3_0_1.ICON_Dataset3.main(ICON_Dataset3.java:1921)
disconnected
Job ICON_Dataset3 ended at 14:39 28/01/2010.
2 REPLIES
Community Manager

Re: soap SQL syntax : INVALID_QUERY_FILTER_OPERATOR

Hello
It's that - WHERE ReportToId like 'Jess*' - that causes the issue.

You can report a bug on our bugtracker. For now, you can query all records and filter them on tFilterRow component or other component.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: soap SQL syntax : INVALID_QUERY_FILTER_OPERATOR

Your query is wrong - not Talend. Check the salesforce.com web services docs for more detail on filters in SOQL.