1

We use some client application named Rally tool where we extract the csv file daily and we need to update those records into salesforce on a daily basis.

Now I need to make this process automated. I have heard something Windows scheduler where in we put our csv file in a separate folder. Once we run some batch file from that folder. It will automatically perform the dataload by taking the csv file present in that folder.

Could you please help if anyone has done this earlier or any suggestions on how to build this?

1
1

You will need to use command line data loader for your requirement.

Dataloader is a tool that lets you load data into SFDC database .You can run this via command line. Check the below article

http://www.jitendrazaa.com/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/

0

In addtion to what Mohith said, You can also use dataloadercliq . It helps to build process around command line data loader . It has a simple UI to create dir structure and other process which can be complicated with CLI.

cliq -- CLIq provides a simple wizard to create directory structures and configuration files for the Salesforce Data Loader Command Line Interface. You can spend hours configuring the CLI manually, or use CLIq and you will have a working configuration in less

https://code.google.com/p/dataloadercliq/
0

You can not do this using only Salesforce, aka apex programming. You will need to use third party tools. There are free and paid tools available. Consider - * Dataloader * Dataloader.io * Talend * Snaplogic * Jitterbit * Skyvia * Informatica * Boomi * Mulesoft

And many more..

1
  • There is no need of third party tools for this simple process as mentioned by Teja in his question. This can be achieved by using Command Line Dataloader. The last Answer in this post by Mohit is the optimal solution according to me, upon successful load we also take that success file and put it on SFTP having an email delivered once done.
    – Raj
    Jul 17 '19 at 13:46
0

I'll pitch in with

NoFrillsTransformation

This does these things, and a bit more (if you want to):

  • Making the Salesforce Data Loader really scriptable (and not just tediously braindead scriptable)
  • Reading any kinds of CSV files, not only SFDC flavored actually ,-separated files (which cannot be read by Excel)
  • Reading from other sources, such as SQLite, MySql, SQL Server, Oracle
  • Querying SAP RFCs

In your case, the configuration of NFT would be quite straightforward. You will need to create an SFDC config XML file (here: sfdc_config.xml), and a simple XML transformation configuration file, which will look similar to this:

<?xml version="1.0" encoding="utf-8"?>
<Transformation>
  <Source config="delim=';'">file://[path to CSV file].csv</Source>
  <Target config="sfdc_config.xml">sfdc://YourTargetEntity.upsert:ExternalId__c</Target>

  <Fields>
    <Field name="ExternalId__c">$Id_in_CSV</Field>
    <Field name="SomeField">$SomeField</Field>
    <Field name="FirstName">$FirstName</Field>
    <Field name="LastName">$LastName</Field>
    <Field name="FullName">$FirstName + " " + $LastName</Field>
  </Fields>
</Transformation>

The $ references in the Field tags must match the field names in your source CSV file. Please also note that you can do various transformations on the fields (which is not possible with the plain Data Loader); NFT contains a quite large range of operators you can use here. In case the content of your CSV file exactly corresponds with the field names of your entity to upsert, you can use a simplified notation of the fields, like so:

<Fields appendSource="true" />

Check out the documentation for a description on how to do insert, upsert or delete, which are all possible using NFT. Note that you have to specify the external ID field for the upsert after a colon in the Target tag; in case you use insert (which I strongly discourage from, it's not idempotent), you must leave that out.

Disclaimer: I wrote this tool, in desperate need of a scriptable Data Loader. This is what I ended up with. I used it to do a full featured scripted data migration from SAP/CRM to Salesforce, and it worked out well. If you need help, reach out to me on github.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.