{"id":4126,"date":"2014-12-27T00:02:43","date_gmt":"2014-12-27T00:02:43","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=4126"},"modified":"2017-04-03T17:37:35","modified_gmt":"2017-04-03T17:37:35","slug":"automate-command-line-dataloader-using-ant-with-dynamic-arguments-and-query","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/automate-command-line-dataloader-using-ant-with-dynamic-arguments-and-query\/","title":{"rendered":"Automate Command Line Dataloader using ANT with Dynamic arguments and SOQL query"},"content":{"rendered":"<p style=\"text-align: justify;\">As we know, there are multiple ways to load data inside Salesforce like using Workbench, Jitterbit, API etc&#8230; Salesforce also provides standard tool to load data into Salesforce using <a title=\"Dataloader in Salesforce\" href=\"https:\/\/www.jitendrazaa.com\/blog\/tag\/data-loader\/\">DataLoader<\/a>. Dataloader by default supports User Interface or Command Line interface. Most of us already know that User interface based Dataloader needs manual interaction by end user. However if you want to automate data related operations, better choice would be Command Line Data Loader. Assuming you already have <a title=\"Command Line Dataloader\" href=\"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/tutorial-of-command-line-dataloader-salesforce\/\">basic knowledge about how CLI Data loader works<\/a>, I will go more advance in this article.<\/p>\n<figure id=\"attachment_4127\" aria-describedby=\"caption-attachment-4127\" style=\"width: 764px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4127\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=764%2C330&#038;ssl=1\" alt=\"Automate Command Line Data Loader\" width=\"764\" height=\"330\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?w=764&amp;ssl=1 764w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=300%2C130&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=624%2C270&amp;ssl=1 624w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><figcaption id=\"caption-attachment-4127\" class=\"wp-caption-text\">Automate Command Line Data Loader<\/figcaption><\/figure>\n<p>Following are basic steps for CLI Dataloader :<\/p>\n<ol>\n<li>Download and install DataLoader<\/li>\n<li>Generate Secret key file<\/li>\n<li>Generate Password on basis of Secret key generated<\/li>\n<li>Create &#8220;Process-conf.xml&#8221; (<em><span style=\"text-decoration: underline;\">here is the problem<\/span><\/em>)<\/li>\n<li>Create field mapping (sdl) file if required<\/li>\n<li>Execute Data loader from Command line<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><!--more-->If you want to repeat same operation every time then there is no issue however what if you need to modify SOQL everytime ? what if you need to extract data, modify\u00a0some value and upload back to Salesforce ? There are endless possibilities you may want to perform with Dataloader but everytime you will need to manually generate &#8220;<strong>Process-config.xml<\/strong>&#8220;, manually update extracted file and then upload. There are many tools available which will auto generate &#8220;Process-config.xml&#8221;, but again it will be manual operation everytime.<\/p>\n<p>We will be automating all these problem with help of ANT tool. This article is inspired by <a title=\"CLI Dataloader using ANT\" href=\"https:\/\/force201.wordpress.com\/2010\/10\/15\/scripting-the-apex-data-loader-via-ant\/\">this<\/a> post.<\/p>\n<p>You will need to <a title=\"Download ANT\" href=\"http:\/\/ant.apache.org\/bindownload.cgi\">download ANT <\/a>and <a title=\"ANT - Environment Setup\" href=\"http:\/\/www.tutorialspoint.com\/ant\/ant_environment.htm\">add path of ANT jar file<\/a> in environment variable.<\/p>\n<p>Also, create secret key file and using this file, you will need to create password, check <a title=\"Command Line Dataloader\" href=\"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/tutorial-of-command-line-dataloader-salesforce\/\">this post to see how to do it<\/a>.<\/p>\n<p>Next step would be creating configuration file which will contain server URL, username and password.<\/p>\n<p><strong>build.properties<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# build.properties\r\nsfSandbox.serverurl = https:\/\/test.salesforce.com\r\nsfProd.serverurl = https:\/\/login.salesforce.com\r\n#Password generated using encrypt.bat\r\n#Example to generate Key - encrypt.bat -g somkey\r\n#Save above output in key.txt\r\n#Example to generate Pwd - encrypt.bat -e urpassword key.txt\r\nsf.prod.profileName.username = yoursalesforce@domain.com\r\nsf.prod.profileName.password = your_encrypted_password_generated_with_securitytoken\r\n<\/pre>\n<p><strong>template-process-conf.xml<\/strong> (to extract records)<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!DOCTYPE beans PUBLIC &quot;-\/\/SPRING\/\/DTD BEAN\/\/EN&quot; &quot;http:\/\/www.springframework.org\/dtd\/spring-beans.dtd&quot;&gt;\r\n&lt;beans&gt;\r\n    &lt;bean id=&quot;_object_&quot; class=&quot;com.salesforce.dataloader.process.ProcessRunner&quot; singleton=&quot;false&quot;&gt;\r\n    &lt;description&gt;TemplatedCsvExtract extracts to a CSV file.&quot;&lt;\/description&gt;\r\n    &lt;property name=&quot;name&quot; value=&quot;TemplatedCsvExtract&quot;\/&gt;\r\n    &lt;property name=&quot;configOverrideMap&quot;&gt;\r\n    &lt;map&gt;\r\n        &lt;entry key=&quot;process.encryptionKeyFile&quot; value=&quot;config\/key.txt&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.endpoint&quot; value=&quot;_serverURL_&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.username&quot; value=&quot;_userName_&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.password&quot; value=&quot;_password_&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.debugMessages&quot; value=&quot;false&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.timeoutSecs&quot; value=&quot;6000&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.extractionRequestSize&quot; value=&quot;_batchSize_&quot;\/&gt;\r\n        &lt;entry key=&quot;process.operation&quot; value=&quot;extract&quot;\/&gt;\r\n        &lt;entry key=&quot;dataAccess.type&quot; value=&quot;csvWrite&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.entity&quot; value=&quot;_object_&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.extractionSOQL&quot; value=&quot;_soql_&quot;\/&gt;\r\n        &lt;entry key=&quot;dataAccess.name&quot; value=&quot;_file_&quot;\/&gt;\r\n        &lt;entry key=&quot;sfdc.debugMessagesFile&quot; value=&quot;_logFile_&quot;\/&gt;\r\n    &lt;\/map&gt;\r\n    &lt;\/property&gt;\r\n    &lt;\/bean&gt;\r\n&lt;\/beans&gt;\r\n<\/pre>\n<p>This template will be used to create actual &#8220;process-conf.xml&#8221; to extract\u00a0records.<\/p>\n<p><strong>template-process-conf_update.xml<\/strong> (to update records)<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!DOCTYPE beans PUBLIC &quot;-\/\/SPRING\/\/DTD BEAN\/\/EN&quot; &quot;http:\/\/www.springframework.org\/dtd\/spring-beans.dtd&quot;&gt;\r\n&lt;beans&gt;\r\n    &lt;bean id=&quot;_object_&quot; class=&quot;com.salesforce.dataloader.process.ProcessRunner&quot; singleton=&quot;false&quot;&gt;\r\n    &lt;description&gt;TemplatedCsvExtract extracts to a CSV file.&quot;&lt;\/description&gt;\r\n    &lt;property name=&quot;name&quot; value=&quot;TemplatedCsvExtract&quot;\/&gt;\r\n    &lt;property name=&quot;configOverrideMap&quot;&gt; \r\n       &lt;map&gt;\r\n            &lt;entry key=&quot;process.encryptionKeyFile&quot; value=&quot;config\/key.txt&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.endpoint&quot; value=&quot;_serverURL_&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.username&quot; value=&quot;_userName_&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.password&quot; value=&quot;_password_&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.debugMessages&quot; value=&quot;false&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.timeoutSecs&quot; value=&quot;6000&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.extractionRequestSize&quot; value=&quot;_batchSize_&quot;\/&gt;\r\n            &lt;entry key=&quot;process.operation&quot; value=&quot;update&quot;\/&gt;\r\n            &lt;entry key=&quot;dataAccess.type&quot; value=&quot;csvRead&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.entity&quot; value=&quot;_object_&quot;\/&gt;\r\n            &lt;entry key=&quot;dataAccess.name&quot; value=&quot;_file_&quot;\/&gt;\r\n            &lt;entry key=&quot;sfdc.debugMessagesFile&quot; value=&quot;_logFile_&quot;\/&gt;\r\n            &lt;entry key=&quot;process.mappingFile&quot;  value=&quot;_mappingFile&quot;\/&gt;\r\n            &lt;entry key=&quot;process.outputError&quot;  value=&quot;_opError_&quot;\/&gt;\r\n            &lt;entry key=&quot;process.outputSuccess&quot; value=&quot;_opSuccess_&quot;\/&gt;\r\n        &lt;\/map&gt;\r\n     &lt;\/property&gt; \r\n    &lt;\/bean&gt;\r\n&lt;\/beans&gt;\r\n<\/pre>\n<p>This template will be used to create actual &#8220;process-conf.xml&#8221; to update records.<\/p>\n<p>Above 2 xml files will act as a template, in which we will replace parameters like &#8220;_serverURL_&#8221;,&#8221;_userName_&#8221; etc&#8230; using ANT.<\/p>\n<p>Field Mapping file &#8211; <strong>AccountFields.sdl<\/strong><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nId=Id\r\nName=Name\r\nStatus__c=Status__c\r\n<\/pre>\n<p>Actual ANT file<strong> &#8220;build.xml&#8221;<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;project name=&quot;Export&quot; default=&quot;all&quot;&gt;\r\n    &lt;property file=&quot;build.properties&quot;\/&gt;\r\n    &lt;property environment=&quot;env&quot;\/&gt;\r\n    &lt;tstamp&gt;\r\n        &lt;format property=&quot;todayDate&quot; pattern=&quot;MM-dd-yyyy_HH-mm-ss&quot; \/&gt;\r\n        &lt;format property=&quot;todayDate_only&quot; pattern=&quot;MM-dd-yyyy&quot; \/&gt;\r\n    &lt;\/tstamp&gt;\r\n    &lt;!-- subtract 2 days from Today --&gt;\r\n    &lt;tstamp&gt;\r\n        &lt;format property=&quot;twoDaysAgo&quot; pattern=&quot;yyyy-MM-dd&quot; offset=&quot;-2&quot;\/&gt;\r\n    &lt;\/tstamp&gt;\r\n\r\n    &lt;macrodef name=&quot;export_Account&quot;&gt;\r\n        &lt;attribute name=&quot;file&quot;\/&gt;\r\n        &lt;attribute name=&quot;object&quot;\/&gt;\r\n        &lt;attribute name=&quot;soql&quot;\/&gt;\r\n        &lt;attribute name=&quot;userName&quot;\/&gt;\r\n        &lt;attribute name=&quot;password&quot;\/&gt;\r\n        &lt;attribute name=&quot;serverURL&quot;\/&gt;\r\n        &lt;attribute name=&quot;batchSize&quot;\/&gt;\r\n        &lt;attribute name=&quot;limit&quot;\/&gt; \r\n\r\n        &lt;sequential&gt;\r\n            &lt;echo message=&quot;Exporting @{object}&quot;\/&gt;\r\n            &lt;mkdir dir=&quot;exports\/${todayDate_only}&quot;\/&gt;\r\n            &lt;mkdir dir=&quot;logs\/${todayDate_only}&quot;\/&gt;\r\n            &lt;input\r\n                message=&quot;Enter Year, example: 2014&quot;\r\n                addproperty=&quot;date.year&quot;\r\n            \/&gt;\r\n            &lt;input\r\n                message=&quot;Enter Month in number&quot;\r\n                validargs=&quot;1,2,3,4,5,6,7,8,9,10,11,12&quot;\r\n                addproperty=&quot;date.month&quot;\r\n            \/&gt;\r\n            &lt;input\r\n                message=&quot;Enter Day&quot;\r\n                addproperty=&quot;date.day&quot;\r\n            \/&gt;\r\n            &lt;copy file=&quot;config\/template-process-conf.xml&quot; tofile=&quot;config\/process-conf.xml&quot; overwrite=&quot;true&quot; failonerror=&quot;true&quot;\/&gt;\r\n            &lt;replace file=&quot;config\/process-conf.xml&quot;&gt;\r\n                &lt;replacefilter token=&quot;_object_&quot; value=&quot;@{object}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_soql_&quot; value=&quot;@{soql} ${date.year}-${date.month}-${date.day}T00:00:00.000+0000 LIMIT @{limit}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_file_&quot; value=&quot;exports\/${todayDate_only}\/@{file}.csv&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_serverURL_&quot; value=&quot;@{serverURL}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_userName_&quot; value=&quot;@{username}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_password_&quot; value=&quot;@{password}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_batchSize_&quot; value=&quot;@{batchSize}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_logFile_&quot; value=&quot;logs\/${todayDate_only}\/@{file}_log.csv&quot;\/&gt;\r\n            &lt;\/replace&gt;\r\n            &lt;java classname=&quot;com.salesforce.dataloader.process.ProcessRunner&quot; classpath=&quot;dataloader-28.0.2-uber.jar&quot; failonerror=&quot;true&quot;&gt;\r\n                &lt;sysproperty key=&quot;salesforce.config.dir&quot; value=&quot;config&quot;\/&gt;\r\n                &lt;arg line=&quot;process.name=@{object}&quot;\/&gt;\r\n            &lt;\/java&gt;\r\n            &lt;copy file=&quot;exports\/${todayDate_only}\/@{file}.csv&quot; tofile=&quot;exports\/${todayDate_only}\/@{file}_Updated.csv&quot; overwrite=&quot;true&quot; failonerror=&quot;true&quot;\/&gt;\r\n            &lt;replace file=&quot;exports\/${todayDate_only}\/@{file}_Updated.csv&quot;&gt;\r\n                &lt;replacefilter token=&quot;UW Created&quot; value=&quot;Ready for Sales&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;UW Executed&quot; value=&quot;Ready for Sales&quot;\/&gt;\r\n            &lt;\/replace&gt;\r\n        &lt;\/sequential&gt;\r\n    &lt;\/macrodef&gt;\r\n    &lt;macrodef name=&quot;update_Account&quot;&gt;\r\n        &lt;attribute name=&quot;file&quot;\/&gt;\r\n        &lt;attribute name=&quot;object&quot;\/&gt;\r\n        &lt;attribute name=&quot;userName&quot;\/&gt;\r\n        &lt;attribute name=&quot;password&quot;\/&gt;\r\n        &lt;attribute name=&quot;serverURL&quot;\/&gt;\r\n        &lt;attribute name=&quot;batchSize&quot;\/&gt;\r\n        &lt;attribute name=&quot;mappingFile&quot;\/&gt;\r\n\r\n        &lt;sequential&gt;\r\n            &lt;echo message=&quot;Updating @{object}&quot;\/&gt;\r\n            &lt;mkdir dir=&quot;exports\/${todayDate_only}&quot;\/&gt;\r\n            &lt;mkdir dir=&quot;logs\/${todayDate_only}&quot;\/&gt;\r\n            &lt;copy file=&quot;config\/template-process-conf_update.xml&quot; tofile=&quot;config\/process-conf.xml&quot; overwrite=&quot;true&quot; failonerror=&quot;true&quot;\/&gt;\r\n            &lt;replace file=&quot;config\/process-conf.xml&quot;&gt;\r\n                &lt;replacefilter token=&quot;_object_&quot; value=&quot;@{object}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_file_&quot; value=&quot;exports\/${todayDate_only}\/@{file}_Updated.csv&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_serverURL_&quot; value=&quot;@{serverURL}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_userName_&quot; value=&quot;@{username}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_password_&quot; value=&quot;@{password}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_batchSize_&quot; value=&quot;@{batchSize}&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_logFile_&quot; value=&quot;logs\/${todayDate_only}\/@{file}_log.csv&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_opSuccess_&quot; value=&quot;logs\/${todayDate_only}\/@{file}_log_Success.csv&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_opError_&quot; value=&quot;logs\/${todayDate_only}\/@{file}_log_error.csv&quot;\/&gt;\r\n                &lt;replacefilter token=&quot;_mappingFile&quot; value=&quot;@{mappingFile}&quot;\/&gt;\r\n            &lt;\/replace&gt;\r\n            &lt;java classname=&quot;com.salesforce.dataloader.process.ProcessRunner&quot; classpath=&quot;dataloader-28.0.2-uber.jar&quot; failonerror=&quot;true&quot;&gt;\r\n                &lt;sysproperty key=&quot;salesforce.config.dir&quot; value=&quot;config&quot;\/&gt;\r\n                &lt;arg line=&quot;process.name=@{object}&quot;\/&gt;\r\n            &lt;\/java&gt;\r\n        &lt;\/sequential&gt;\r\n    &lt;\/macrodef&gt;\r\n    &lt;target name=&quot;all&quot;&gt;\r\n        &lt;export_Account\r\n            file=&quot;Account_backup-${todayDate}&quot;\r\n            object=&quot;Account&quot;\r\n            soql=&quot;Select Id, Name,Status__c from Account WHERE CreatedDate &gt;  &quot;\r\n            userName=&quot;${sf.prod.profileName.username}&quot;\r\n            password=&quot;${sf.prod.profileName.password}&quot;\r\n            serverURL=&quot;${sfProd.serverurl}&quot;\r\n            batchSize=&quot;200&quot;\r\n            limit = &quot;1000&quot; \/&gt; \r\n\r\n        &lt;update_Account\r\n            file=&quot;Account_backup-${todayDate}&quot;\r\n            object=&quot;Account&quot;\r\n            userName=&quot;${sf.prod.profileName.username}&quot;\r\n            password=&quot;${sf.prod.profileName.password}&quot;\r\n            serverURL=&quot;${sfProd.serverurl}&quot;\r\n            batchSize=&quot;1&quot;\r\n            mappingFile=&quot;config\/AccountFields.sdl&quot;\/&gt;\r\n    &lt;\/target&gt;\r\n&lt;\/project&gt;\r\n<\/pre>\n<p><strong>How it all fits and works ?<\/strong><\/p>\n<figure id=\"attachment_4127\" aria-describedby=\"caption-attachment-4127\" style=\"width: 764px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4127 size-full\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=764%2C330&#038;ssl=1\" alt=\"Automate Command Line Data Loader\" width=\"764\" height=\"330\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?w=764&amp;ssl=1 764w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=300%2C130&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/12\/Automate-Command-Line-Data-Loader.jpg?resize=624%2C270&amp;ssl=1 624w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><figcaption id=\"caption-attachment-4127\" class=\"wp-caption-text\">Automate Command Line Data Loader<\/figcaption><\/figure>\n<ol>\n<li style=\"text-align: justify;\">Execute command &#8220;ANT all&#8221; or create a batch file with this command.<\/li>\n<li style=\"text-align: justify;\">It will Ask for user input to enter Year, month and Day<\/li>\n<li style=\"text-align: justify;\">On basis of input provided it will create SOQL to get all Account which are created after that date<\/li>\n<li style=\"text-align: justify;\">It will Create &#8220;process-conf.xml&#8221; and dynamically populate soql, export file location, username, password etc.<\/li>\n<li style=\"text-align: justify;\">It will create two folder if not exists &#8211; &#8220;exports&#8221; and &#8220;logs&#8221;<\/li>\n<li style=\"text-align: justify;\">It will create folder by date name to maintain data backup<\/li>\n<li style=\"text-align: justify;\">Dataloader command will be executed to start exporting Account<\/li>\n<li style=\"text-align: justify;\">Once Account is exported in CSV file, it will create its copy and replace &#8220;status__c&#8221;\u00a0field value by &#8220;Ready For Sales&#8221;.<\/li>\n<li style=\"text-align: justify;\">Once file is updated, ANT will create new &#8220;Process-conf.xml&#8221; to update Account record from &#8220;template-process-conf_update.xml&#8221;\u00a0template file.<\/li>\n<li style=\"text-align: justify;\">Dataloader command will be executed to start updating Account<\/li>\n<\/ol>\n<p><strong>How to schedule Command line dataloader to run automatically ?<\/strong><\/p>\n<p>Create batch file with your ANT command, in this case &#8220;ANT all&#8221;. Schedule this file using Windows scheduler, <a title=\"How to schedule a Batch File to run automatically in Windows 7 | 8\" href=\"http:\/\/www.thewindowsclub.com\/how-to-schedule-batch-file-run-automatically-windows-7\" target=\"_blank\" rel=\"nofollow\">check this useful post for more information<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we know, there are multiple ways to load data inside Salesforce like using Workbench, Jitterbit, API etc&#8230; Salesforce also provides standard tool to load data into Salesforce using DataLoader. Dataloader by default supports User Interface or Command Line interface. Most of us already know that User interface based Dataloader needs manual interaction by end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[261,58,281,72,331],"class_list":["post-4126","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-ant","tag-cli","tag-command-line-dataloader","tag-dataloader","tag-salesforce"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3122,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/tutorial-of-command-line-dataloader-salesforce\/","url_meta":{"origin":4126,"position":0},"title":"Command line dataloader in Salesforce &#8211; Solve Common errors","author":"Jitendra","date":"September 26, 2012","format":false,"excerpt":"How to use Command line dataloader in Salesforce with troubleshooting steps and answers to common errors","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Commandline Data Loader tools","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/09\/Commandline-Data-Loader-tools.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4431,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/using-dataloader-and-ant-to-backup-salesforce-data-on-ftp-server-video\/","url_meta":{"origin":4126,"position":1},"title":"Using Dataloader and ANT to backup Salesforce data on FTP or SFTP server &#8211; Video","author":"Jitendra","date":"May 4, 2015","format":false,"excerpt":"Tutorial on how to use command line dataloader to save exported Salesforce backup file on FTP or SFTP server","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Use Dataloader and ANT to back CSV file on FTP Server","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5835,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/considerations-and-best-practices-for-salesforce-dataloading\/","url_meta":{"origin":4126,"position":2},"title":"Considerations and Best practices for Salesforce Dataloading","author":"Jitendra","date":"January 29, 2018","format":false,"excerpt":"Although we are doing data loading in Salesforce from ages, its very common to miss some steps or considerations. Therefore thought to list some of best practices and considerations I follow before or during data load process. Developer note field - I mostly create a text field on every object\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Dataloader","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4447,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/all-about-upsert-and-external-id-in-dataloader-and-apex-videos\/","url_meta":{"origin":4126,"position":3},"title":"All about Upsert and External ID in Dataloader and Apex &#8211; Videos","author":"Jitendra","date":"May 11, 2015","format":false,"excerpt":"You may be wondering that there are tons of articles available for upsert operation and what is need of one more blog post. I wanted to note everything important about upsert operations using datalaoder and Apex with identified gotchas at single place, and that's why its here :) . External\u2026","rel":"","context":"In &quot;Apex&quot;","block_context":{"text":"Apex","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/apex\/"},"img":{"alt_text":"Field Mapping to create Parent Child relationship using ExternalId in Salesforce","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Field-Mapping-to-create-Parent-Child-relationship-using-ExternalId-in-Salesforce-e1431304939365.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Field-Mapping-to-create-Parent-Child-relationship-using-ExternalId-in-Salesforce-e1431304939365.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Field-Mapping-to-create-Parent-Child-relationship-using-ExternalId-in-Salesforce-e1431304939365.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3201,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/import-user-quotas-for-collaborative-forecasting\/","url_meta":{"origin":4126,"position":4},"title":"Import User Quotas in Amount for Collaborative forecasting","author":"Jitendra","date":"February 24, 2013","format":false,"excerpt":"In Customizable Forecast, we can add the Quota for user by navigating to User Page and going to Quota related list However in Collaborative Forecasting aka Forecast 3 the only way is using Data Loader. 1. Log-in to the Data Loader and use the Insert function. 2. Click \"Show all\u2026","rel":"","context":"In &quot;Configuration&quot;","block_context":{"text":"Configuration","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/configuration\/"},"img":{"alt_text":"Import Quota Using DataLoader","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/02\/Import-Quota-Using-DataLoader.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/02\/Import-Quota-Using-DataLoader.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/02\/Import-Quota-Using-DataLoader.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3586,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/import-user-quotas-in-quantity-unit-for-collaborative-forecasting\/","url_meta":{"origin":4126,"position":5},"title":"Import User Quotas in Quantity (Unit) for Collaborative Forecasting","author":"Jitendra","date":"November 7, 2013","format":false,"excerpt":"In Previous article we have seen that how to import Quota in Amount (Revenue) for Collaborative forecasting. \u00a0I got many request on how to upload Quota in Units, as in Forecasting tab you can see that there is option to see Forecast in Unit or Amount. If we switch from\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Display Forecast as Quantity or Revenue","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2013\/11\/Salesforce-Display-Forecast-as-Quantity-or-Revenue.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=4126"}],"version-history":[{"count":7,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4126\/revisions"}],"predecessor-version":[{"id":5984,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4126\/revisions\/5984"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=4126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=4126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=4126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}