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
AnupamaAnupama 

Exporting Data with Apex data loader.

When i exported data using the apex dataloader, the look up fields are exported as Ids, If they have to exported as exact names, what should be the query.
gotherthanthougotherthanthou

Although I may be wrong, I don't think the Export function in the data loader allows you to use join's in the query.

 

You can get around this by also exporting the objects you need to join to (including the ID and whatever fields you need from them) and performing the join with the target software.

lvivaninlvivanin
May be you can export the report detail. If necessary create a report type first.
MVJMVJ

You can get at the data.

 

For example if you are exporting account data and you wanted to get the account owner name:

 

Select Id, Name, Ownerid, Owner.name from Account

 

you would get the Account Id, the Account Name, the actuall Owner ID and the name of the owner.

 

Hope this helps you out.

 

 

AnupamaAnupama

The tables does not exactly parent-child relationship.What i have is the LokkUp field. It is like i want to store city name in one of my table and I refer it from City table.  When I gave the query as suggested by you, it gave the error malformed query.

MVJMVJ

Provide more details.  What object are you exporting from?  Is it a custom object?  What object are you trying to get the additional data from?

 

Post the query.

 

 

MVJMVJ
Also note that the query I provided above works perfectly against the account object.  It has something to do with the object that you are exporting against.
AnupamaAnupama

Yes, it is the custom object, the query formed using ApexDataLoader is "Select Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastActivityDate, Source__c, Destination__c, Flight_Name__c, Provider__c, Arrival__c, Departure__c, Class__c, Available_Seats__c, Booked_Seats__c FROM Aircraft__c " , Here Source__c, Destination__c are the LookUp fields from the another custom object Airport__c.

 

 

When the data is exported, it appears in the form

 

SOURCE__CDESTINATION__C
a0590000000FiU0AAK a0590000000FiTxAAK
, instead of their actual names. If query is modified with  Airport__c.Source__c, Airport__c.Destination__c, it gives the error as malformed query.

MVJMVJ

Sorry I am running blind as I am leaving for vacation today.

 

But try Airport__r.Source__c

 

The r is for a refrence field.

 

AnupamaAnupama
Thanks for the reply.I have tried both Airport__c.Source__c and Airport__r.Source__c. Both gives error. Please let me know if anything else needs to be taken care of.