function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MegachuckmcMegachuckmc 

Is there an Apex Dataloader guru out there?

I'm having the hardest time trying to get what I believe should be an easy answer regarding a SOQL query that doesn't work in the Apex DataLoader (14.0)

 

A query created with Ajax Tools (2.0) returns expected results but when I run the query in the DataLoader I get a "Malformed Query" error.  This is the case whether I run it with the DataLoader GUI or from the CLI.

 

SELECT Account.Name, Name, Amount, Probability, ExpectedRevenue, (SELECT  Quantity, TotalPrice, UnitPrice, pricebookentry.productcode FROM OpportunityLineItems) FROM Opportunity Where amount > 4000000

 

 

Any help is greatly appreciated

Mike

SuperfellSuperfell
What's the rest of the error message after malformed query ?
MegachuckmcMegachuckmc

That's the problem... When i run it from the GUI there is no details regarding what is malformed in the query.  The error message just says "Error in query: Malformed query string: And then it just reproduces the query string.

 

The message I get when running from the CLI is equally as non-specific as to why the query is malformed.

 

 

Richie DRichie D

Don't you just love the dataloader ;)

 

I'd be thinking that it doesn't like your subquery. The dataloader seems to like working on only one 'object' type at a time.

 

I don't know if this is your problem but I'd try and simplify the query until it works and then go from there.

 

Very best of luck to you!

 

R.

(p.s. I'm not a dataloader guru but I've spent a few hours in its company and formed a 'love/hate' relationship with it.)

TommyJohnwTommyJohnw

I'm having difficulty with subqueries using data loader as well. Even the most basic example from here: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm

returns a malformed query error with no further description.

 


SELECT Name, (SELECT LastName FROM Contacts) FROM Account
MegachuckmcMegachuckmc

Unfortunately I found out (finally) that DataLoader does not support nested queries or querying Child objects!

 

Which for the life of me I don't understand why.  Seems pretty darn basic to me.

 

 

 

MegachuckmcMegachuckmc

Not sure if your query was just a simple example to illustrate the problem you were having but if not... 

 

Try this instead:

 

SELECT LastName, Account.Name From Contacts

 

Also: If you haven't already done so,  I suggest downloading the DataLoader manual

 

https://na1.salesforce.com/help/doc/en/salesforce_data_loader.pdf