SlideShare a Scribd company logo
Salesforce Admin's guide : the data loader from the command line
1. Using Data Loader from the command line - Salesforce
Using the Salesforce Data Loader is convenient but laborious ...
Convenient because it is possible to retrieve any Salesforce database object : contacts,
customers, prospects, current opportunities, active users ...
But the handling is long because you only have to repeat orders in the GUI : copy / paste ID
and password, scan existing objects, select one, validate, select fields to export, possibly
building filters, validate, revalidate and produce the CSV file under the directory you
precised. Things are repeated more or less for other manipulations such as insert, update
and upsert adding the choice of the mapping file. And this sometimes several times per day.
So little interest to the user that he will see from a benevolent eye the automation off all
this. Good new, the use of Salesforce Data Loader in text mode is possible (-:
You just need to know if you connect to the internet via a proxy or live.
2. Start by creating a new directory on your PC
Create SF subdirectory D:Data(To change depending on your PC configuration, yours
needs)
Go to C:Program Files (x86)salesforce.comData Loader (possibly adjusted according to the
installation directory of your data loader)
Copy the bin directories, Java, Samples and dataloader-XX.0.0 uber.jar to D:DataSF. These
directories are used regardless of the type of operation performed: insert, export ...
Create directory export D:DataSFexport, D:DataSFimport, D:DataSFupdate,
D:DataSFupsert
3. Create three empty files :
key.txt, config.properties, process-conf.xml (confirm properties and xml extensions despite
the Windows warning messages). Place them in D:DataSFexport
These directory and files are used for a single operation: export Salesforce data.
The principle is to separate the files containing the SQL query to export (Salesforce's called
SOQL) and the file with passwords for maintenance issues. When you change your password,
there is only one place to change them!
4. Configure the files:
We first set config.properties:
#Loader Config
#03/04/2015
#sfdc.debugMessages=true
#sfdc.debugMessagesFile = D:Donneessfinsert1AccountExport.log these 2 lines are comments
process.encryptionKeyFile=D:DonneesSFinsertkey.txt #way to your key.txt file don’t forget the

sfdc.endpoint=https://login.salesforce.com
sfdc.username=your_salesforce_email #No « « no ‘’
sfdc.password=To-INQUIRE we will come back to this
sfdc.proxyUsername=ID proxy
sfdc.proxyPassword= To-INQUIRE we will come back to this
sfdc.proxyHost= proxy parameters see in your internet brownser
sfdc.proxyPort= proxy parameters see in your internet brownser
sfdc.loadBatchSize=100
sfdc.timeoutSecs=600
This is where things get complicated a bit. Passwords must be encrypted. For this, Salesforce
provides an encryption program. (you copy the bin directory did you ?)
You must start the Windows’s console (under Start Menu, Search programs and files, type
cmd).
Step 1: Move to the bin directory with the command cd "cd D:DataSFbin" (remember DOS
commands ?). Type the following command : encrypt.bat
TheTextYouWantImagineAnythingYouWant -g
Figure 2 CMD window in Windows 7
Copy and paste the result of the command in the encryption key.txt file. no need to put "".
Save changes. Pay attention to space, no spKey.txt close the file. End of the step 1.
Step 2: Always in the console, always under D:DataSFbin, run the following command
encrypt.bat YourProxipassword –e "D:DataSFimportkey.txt".
Step 3: Password encryption password Salesforce + token concatenated without spaces.
Always in the console, always under D:DataSFbin, run the following command encrypt.bat
YourSalesforcePasswordWith theEncryptedToken –e " D:DataSFexportkey.txt". Set aside
the encrypted password generated.
Step 4: Open the config.propertie file. The goal is to complete all the parameters with the
encrypted passwords obtained.
1. Your ID recognized by the proxy
2. Your CDMrecognized by the proxy and encrypted now
3. Your Login Salesforce
4. Your MDP + Salesforce token concatenated and encrypted now
Save changes.
Work on the config.properties file is finished.
We configure process-conf.xml by copying this in-process conf.xml
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-
beans.dtd">
<beans>
<!--
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooo
ooooooooooooooooooooooooooo PREMIER EXTRACT
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- RESTE A METTRE LA DATE DANS LE FICHIER EN SORTIE ET REGLER LES REPERTOIRES pour
SAUVEGARDER -->
<!-- LES CSV Exports a deposer dans les repertoires habituels D:X_RepDepotFiles_TmpMAJ Salesforce_
Extract Cptes Distrib_Users
puis creer les .bat et la doc d'installation -->
<bean id="ExtractUser"
class="com.salesforce.dataloader.process.ProcessRunner"
singleton="false">
<description>ExtractUser job gets User info from salesforce and saves info into a CSV file.</description>
<property name="name" value="ExtractUser"/>
<property name="configOverrideMap">
<map>
<!-- Attention pour le moment 12/02/2015, concernant les commentaires les caracteres accentues ne passent
pas dans l'export et provoquent des erreurs
Ligne de commande process.bat "D:DonneesSFtest" ExtractUser -->
<!-- Fichiers de logs -->
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile" value="D:DonneesSFtestlogExtractUser.log"/>
<!-- Parametres extraction Salesforce idema config du dataloader-->
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.loadBatchSize" value="200"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="sfdc.extractionRequestSize" value="500"/>
<entry key="sfdc.entity" value="User"/>
<!-- requete SOQL-->
<entry key="sfdc.extractionSOQL" value="Select Id, LastName, FirstName, Username, CommunityNickname,
CompanyName, Division, Department, Title, City, Email, IsActive, UserRoleId, ProfileId, UserType,
DelegatedApproverId, ManagerId, LastLoginDate, CreatedDate, LastModifiedDate, DesactivOrderDat__c,
CreatedById, LastModifiedById, IsPortalEnabled, PerId__c, Agence__c, EmployeeNum__c, BU__c,
Pointdevente__c, Brand__c, Username__c, LDAPLogin__c, RegDCDiv__c, SousRegion__c, Marche__c,
CompanyName__c, PerformId__c, resp_workflow_dae__c, MultiPDV__c, CodeEnseigne__c FROM User"/>
<!-- Nom du process, pour nous extract, possibilite de faire toutes les autres operation a condition d'avoir
fichier sdl et regler-->
<entry key="process.operation" value="extract"/>
<!-- reglage export, fichier sortie, et logs en cas d'erreur -->
<entry key="dataAccess.type" value="csvWrite"/>
<entry key="dataAccess.readUTF8" value="true"/>
<entry key="dataAccess.writeUTF8" value="true"/>
<entry key="dataAccess.name" value="D:Donnees_ Extract Cptes Distrib_UsersUser_Salesforce.csv"/>
<entry key="process.outputError" value="D:DonneesSFtestlogErrorExtractUser.csv"/>
</map>
</property>
</bean>
</beans>
Some explanations. The most important part of the file is the following entry:
<entry key = "sfdc.extractionSOQL" value = "Select ID, LastName, FirstName, Username,
CommunityNickname, CompanyName, Division, Department, Title, City, Email, IsActive,
UserRoleId, ProfileId, UserType, DelegatedApproverId, ManagerID, LastLoginDate,
CreatedDate , LastModifiedDate, DesactivOrderDat__c, CreatedById, LastModifiedById,
IsPortalEnabled, PerId__c, Agence__c, EmployeeNum__c, BU__c, Pointdevente__c,
Brand__c, Username__c, LDAPLogin__c, RegDCDiv__c, SousRegion__c, Marche__c,
CompanyName__c, PerformId__c, resp_workflow_dae__c, MultiPDV__c, CodeEnseigne__c
FROM User "/>
This part is the SOQL order. It could for example be adapted as follows according your needs
:
<entry key = "sfdc.extractionSOQL" value = "Select * FROM User" />
Just copy and paste your usual application as it appears in your Data Loader window
between characters "."
There is a second important input is <bean id = "ExtractUser" we will return.
5. Creating execution file
We reach the goal, go to the office, export.bat create the file, copy the following lines.
echo off
cd "D:DataSFbin"
process.bat start "D:Datasfexport" ExtractUser this tell you something?
6. Operation:
Double click on the file export.bat. After some time, you will have the query result in a cvs
file located under D:Data_ Extract CPTES Distrib_Users
Then simply to provide a task to run automatically, for example to recover your PC to start
the file without anything to do.
7. Futur
It is possible to export more by .XML file. It is possible to do insert, update and upsert, any
operation you do with the data loader. We will return if you suggest us to.
Thanks !

More Related Content

What's hot (20)

PPTX
Database application and design
sieedah
 
PDF
Share point review qustions
than sare
 
PDF
Oracle apex-hands-on-guide lab#1
Amit Sharma
 
PPTX
Oracle Endeca Commerce - Installation Guide
Keyur Shah
 
PPTX
Oracle Endeca Developer's Guide
Keyur Shah
 
PPTX
Asp.net
vijilakshmi51
 
DOCX
OBIEE 11g : Repository Creation Steps
Dharmaraj Borse
 
PDF
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Feras Ahmad
 
DOC
( 13 ) Office 2007 Coding With Excel And Excel Services
LiquidHub
 
PDF
Style Intelligence Evaluation Documentation
ArleneWatson
 
DOC
Oracle Application Framework Cases
Feras Ahmad
 
PPTX
Summer '16 Realease notes
aggopal1011
 
PPTX
Learning How to Shape and Configure an OData Service for High Performing Web ...
Woodruff Solutions LLC
 
PPTX
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Woodruff Solutions LLC
 
PPT
Dh2 Apps Training Part2
jamram82
 
PPT
Microsoft Azure
Dima Maleev
 
PPTX
Apex basics-for Beginners
hrakhra
 
DOCX
Spring review_for Semester II of Year 4
than sare
 
PPT
Oracle D2K reports
Rajesh Ch
 
Database application and design
sieedah
 
Share point review qustions
than sare
 
Oracle apex-hands-on-guide lab#1
Amit Sharma
 
Oracle Endeca Commerce - Installation Guide
Keyur Shah
 
Oracle Endeca Developer's Guide
Keyur Shah
 
Asp.net
vijilakshmi51
 
OBIEE 11g : Repository Creation Steps
Dharmaraj Borse
 
Infolets and OTBI Deep link Actionable Reports - Configuration Work Book
Feras Ahmad
 
( 13 ) Office 2007 Coding With Excel And Excel Services
LiquidHub
 
Style Intelligence Evaluation Documentation
ArleneWatson
 
Oracle Application Framework Cases
Feras Ahmad
 
Summer '16 Realease notes
aggopal1011
 
Learning How to Shape and Configure an OData Service for High Performing Web ...
Woodruff Solutions LLC
 
Gaining the Knowledge of the Open Data Protocol (OData) - Prairie Dev Con
Woodruff Solutions LLC
 
Dh2 Apps Training Part2
jamram82
 
Microsoft Azure
Dima Maleev
 
Apex basics-for Beginners
hrakhra
 
Spring review_for Semester II of Year 4
than sare
 
Oracle D2K reports
Rajesh Ch
 

Viewers also liked (13)

PDF
Webinar: Take Control of Your Org with Salesforce Optimizer
Salesforce Admins
 
PDF
Introduction to Flow
Salesforce Admins
 
PPT
Importing data to salesforce
NetStronghold
 
PDF
Take Security to the Next Level w/ Lightning Login
Salesforce Admins
 
PDF
Get Nerdy with Lightning Experience Page Layouts
Salesforce Admins
 
PDF
DF17 Admin Track Speaker Insights
Salesforce Admins
 
PPTX
2016 Opportunity Process 111116
Randi Thompson
 
PDF
6 Reporting Formulas That Will Delight Your Users
Salesforce Admins
 
PDF
Using Personas for Salesforce Accessibility and Security
Salesforce Admins
 
PDF
How to Build an AppExchange Strategy
Salesforce Admins
 
PDF
Webinar Coding for Salesforce Admins
Salesforce Admins
 
PDF
How Salesforce Launched Lightning in 7 Steps
Salesforce Admins
 
PDF
Build Your Lightning Rollout Plan - September 2017
Salesforce Admins
 
Webinar: Take Control of Your Org with Salesforce Optimizer
Salesforce Admins
 
Introduction to Flow
Salesforce Admins
 
Importing data to salesforce
NetStronghold
 
Take Security to the Next Level w/ Lightning Login
Salesforce Admins
 
Get Nerdy with Lightning Experience Page Layouts
Salesforce Admins
 
DF17 Admin Track Speaker Insights
Salesforce Admins
 
2016 Opportunity Process 111116
Randi Thompson
 
6 Reporting Formulas That Will Delight Your Users
Salesforce Admins
 
Using Personas for Salesforce Accessibility and Security
Salesforce Admins
 
How to Build an AppExchange Strategy
Salesforce Admins
 
Webinar Coding for Salesforce Admins
Salesforce Admins
 
How Salesforce Launched Lightning in 7 Steps
Salesforce Admins
 
Build Your Lightning Rollout Plan - September 2017
Salesforce Admins
 
Ad

Similar to Salesforce Admin's guide : the data loader from the command line (20)

PDF
New Flash Builder 4 WSDL and HTTP Connectors
rtretola
 
PPT
Evolutionary db development
Open Party
 
PDF
Working With The Symfony Admin Generator
John Cleveley
 
PPTX
Your admin toolbelt is not complete without Salesforce DX
Daniel Stange
 
PDF
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS
 
DOCX
Shared Coursework in Cyber Security Instructions Manual .docx
edgar6wallace88877
 
PPT
BP501 - Building and deploying custom IBM sametime connect client installatio...
Carl Tyler
 
PPTX
Mule using Salesforce
Khasim Cise
 
PPTX
mule salesforce
Khasim Saheb
 
PPTX
PowerShell-and-DSC-Enables-DSCDevOps-1.pptx
prabhatthunuguntla
 
ODP
Asian Spirit 3 Day Dba On Ubl
newrforce
 
PPT
An overview of snowflake
Sivakumar Ramar
 
PPTX
Share point 2010_overview-day4-code
Narayana Reddy
 
PPTX
Share point 2010_overview-day4-code
Narayana Reddy
 
PDF
Symfony2 revealed
Fabien Potencier
 
PPS
Simplify your professional web development with symfony
Francois Zaninotto
 
PDF
Fix me if you can - DrupalCon prague
hernanibf
 
PDF
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
PPT
Sqllite
Senthil Kumar
 
PPT
Deploying DAOS and ID Vault
Luis Guirigay
 
New Flash Builder 4 WSDL and HTTP Connectors
rtretola
 
Evolutionary db development
Open Party
 
Working With The Symfony Admin Generator
John Cleveley
 
Your admin toolbelt is not complete without Salesforce DX
Daniel Stange
 
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS
 
Shared Coursework in Cyber Security Instructions Manual .docx
edgar6wallace88877
 
BP501 - Building and deploying custom IBM sametime connect client installatio...
Carl Tyler
 
Mule using Salesforce
Khasim Cise
 
mule salesforce
Khasim Saheb
 
PowerShell-and-DSC-Enables-DSCDevOps-1.pptx
prabhatthunuguntla
 
Asian Spirit 3 Day Dba On Ubl
newrforce
 
An overview of snowflake
Sivakumar Ramar
 
Share point 2010_overview-day4-code
Narayana Reddy
 
Share point 2010_overview-day4-code
Narayana Reddy
 
Symfony2 revealed
Fabien Potencier
 
Simplify your professional web development with symfony
Francois Zaninotto
 
Fix me if you can - DrupalCon prague
hernanibf
 
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
Sqllite
Senthil Kumar
 
Deploying DAOS and ID Vault
Luis Guirigay
 
Ad

Recently uploaded (20)

PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Executive Business Intelligence Dashboards
vandeslie24
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Import Data Form Excel to Tally Services
Tally xperts
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 

Salesforce Admin's guide : the data loader from the command line

  • 2. 1. Using Data Loader from the command line - Salesforce Using the Salesforce Data Loader is convenient but laborious ... Convenient because it is possible to retrieve any Salesforce database object : contacts, customers, prospects, current opportunities, active users ... But the handling is long because you only have to repeat orders in the GUI : copy / paste ID and password, scan existing objects, select one, validate, select fields to export, possibly building filters, validate, revalidate and produce the CSV file under the directory you precised. Things are repeated more or less for other manipulations such as insert, update and upsert adding the choice of the mapping file. And this sometimes several times per day. So little interest to the user that he will see from a benevolent eye the automation off all this. Good new, the use of Salesforce Data Loader in text mode is possible (-: You just need to know if you connect to the internet via a proxy or live. 2. Start by creating a new directory on your PC Create SF subdirectory D:Data(To change depending on your PC configuration, yours needs) Go to C:Program Files (x86)salesforce.comData Loader (possibly adjusted according to the installation directory of your data loader) Copy the bin directories, Java, Samples and dataloader-XX.0.0 uber.jar to D:DataSF. These directories are used regardless of the type of operation performed: insert, export ... Create directory export D:DataSFexport, D:DataSFimport, D:DataSFupdate, D:DataSFupsert 3. Create three empty files : key.txt, config.properties, process-conf.xml (confirm properties and xml extensions despite the Windows warning messages). Place them in D:DataSFexport These directory and files are used for a single operation: export Salesforce data. The principle is to separate the files containing the SQL query to export (Salesforce's called SOQL) and the file with passwords for maintenance issues. When you change your password, there is only one place to change them! 4. Configure the files: We first set config.properties: #Loader Config
  • 3. #03/04/2015 #sfdc.debugMessages=true #sfdc.debugMessagesFile = D:Donneessfinsert1AccountExport.log these 2 lines are comments process.encryptionKeyFile=D:DonneesSFinsertkey.txt #way to your key.txt file don’t forget the sfdc.endpoint=https://login.salesforce.com sfdc.username=your_salesforce_email #No « « no ‘’ sfdc.password=To-INQUIRE we will come back to this sfdc.proxyUsername=ID proxy sfdc.proxyPassword= To-INQUIRE we will come back to this sfdc.proxyHost= proxy parameters see in your internet brownser sfdc.proxyPort= proxy parameters see in your internet brownser sfdc.loadBatchSize=100 sfdc.timeoutSecs=600 This is where things get complicated a bit. Passwords must be encrypted. For this, Salesforce provides an encryption program. (you copy the bin directory did you ?) You must start the Windows’s console (under Start Menu, Search programs and files, type cmd). Step 1: Move to the bin directory with the command cd "cd D:DataSFbin" (remember DOS commands ?). Type the following command : encrypt.bat TheTextYouWantImagineAnythingYouWant -g Figure 2 CMD window in Windows 7 Copy and paste the result of the command in the encryption key.txt file. no need to put "". Save changes. Pay attention to space, no spKey.txt close the file. End of the step 1.
  • 4. Step 2: Always in the console, always under D:DataSFbin, run the following command encrypt.bat YourProxipassword –e "D:DataSFimportkey.txt". Step 3: Password encryption password Salesforce + token concatenated without spaces. Always in the console, always under D:DataSFbin, run the following command encrypt.bat YourSalesforcePasswordWith theEncryptedToken –e " D:DataSFexportkey.txt". Set aside the encrypted password generated. Step 4: Open the config.propertie file. The goal is to complete all the parameters with the encrypted passwords obtained. 1. Your ID recognized by the proxy 2. Your CDMrecognized by the proxy and encrypted now 3. Your Login Salesforce 4. Your MDP + Salesforce token concatenated and encrypted now Save changes. Work on the config.properties file is finished. We configure process-conf.xml by copying this in-process conf.xml <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring- beans.dtd"> <beans> <!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooo PREMIER EXTRACT oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo --> <!-- RESTE A METTRE LA DATE DANS LE FICHIER EN SORTIE ET REGLER LES REPERTOIRES pour SAUVEGARDER --> <!-- LES CSV Exports a deposer dans les repertoires habituels D:X_RepDepotFiles_TmpMAJ Salesforce_ Extract Cptes Distrib_Users puis creer les .bat et la doc d'installation --> <bean id="ExtractUser" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false"> <description>ExtractUser job gets User info from salesforce and saves info into a CSV file.</description> <property name="name" value="ExtractUser"/>
  • 5. <property name="configOverrideMap"> <map> <!-- Attention pour le moment 12/02/2015, concernant les commentaires les caracteres accentues ne passent pas dans l'export et provoquent des erreurs Ligne de commande process.bat "D:DonneesSFtest" ExtractUser --> <!-- Fichiers de logs --> <entry key="sfdc.debugMessages" value="true"/> <entry key="sfdc.debugMessagesFile" value="D:DonneesSFtestlogExtractUser.log"/> <!-- Parametres extraction Salesforce idema config du dataloader--> <entry key="sfdc.timeoutSecs" value="600"/> <entry key="sfdc.loadBatchSize" value="200"/> <entry key="sfdc.entity" value="Account"/> <entry key="sfdc.extractionRequestSize" value="500"/> <entry key="sfdc.entity" value="User"/> <!-- requete SOQL--> <entry key="sfdc.extractionSOQL" value="Select Id, LastName, FirstName, Username, CommunityNickname, CompanyName, Division, Department, Title, City, Email, IsActive, UserRoleId, ProfileId, UserType, DelegatedApproverId, ManagerId, LastLoginDate, CreatedDate, LastModifiedDate, DesactivOrderDat__c, CreatedById, LastModifiedById, IsPortalEnabled, PerId__c, Agence__c, EmployeeNum__c, BU__c, Pointdevente__c, Brand__c, Username__c, LDAPLogin__c, RegDCDiv__c, SousRegion__c, Marche__c, CompanyName__c, PerformId__c, resp_workflow_dae__c, MultiPDV__c, CodeEnseigne__c FROM User"/> <!-- Nom du process, pour nous extract, possibilite de faire toutes les autres operation a condition d'avoir fichier sdl et regler--> <entry key="process.operation" value="extract"/> <!-- reglage export, fichier sortie, et logs en cas d'erreur --> <entry key="dataAccess.type" value="csvWrite"/> <entry key="dataAccess.readUTF8" value="true"/> <entry key="dataAccess.writeUTF8" value="true"/> <entry key="dataAccess.name" value="D:Donnees_ Extract Cptes Distrib_UsersUser_Salesforce.csv"/> <entry key="process.outputError" value="D:DonneesSFtestlogErrorExtractUser.csv"/> </map>
  • 6. </property> </bean> </beans> Some explanations. The most important part of the file is the following entry: <entry key = "sfdc.extractionSOQL" value = "Select ID, LastName, FirstName, Username, CommunityNickname, CompanyName, Division, Department, Title, City, Email, IsActive, UserRoleId, ProfileId, UserType, DelegatedApproverId, ManagerID, LastLoginDate, CreatedDate , LastModifiedDate, DesactivOrderDat__c, CreatedById, LastModifiedById, IsPortalEnabled, PerId__c, Agence__c, EmployeeNum__c, BU__c, Pointdevente__c, Brand__c, Username__c, LDAPLogin__c, RegDCDiv__c, SousRegion__c, Marche__c, CompanyName__c, PerformId__c, resp_workflow_dae__c, MultiPDV__c, CodeEnseigne__c FROM User "/> This part is the SOQL order. It could for example be adapted as follows according your needs : <entry key = "sfdc.extractionSOQL" value = "Select * FROM User" /> Just copy and paste your usual application as it appears in your Data Loader window between characters "." There is a second important input is <bean id = "ExtractUser" we will return. 5. Creating execution file We reach the goal, go to the office, export.bat create the file, copy the following lines. echo off cd "D:DataSFbin" process.bat start "D:Datasfexport" ExtractUser this tell you something? 6. Operation: Double click on the file export.bat. After some time, you will have the query result in a cvs file located under D:Data_ Extract CPTES Distrib_Users Then simply to provide a task to run automatically, for example to recover your PC to start the file without anything to do. 7. Futur
  • 7. It is possible to export more by .XML file. It is possible to do insert, update and upsert, any operation you do with the data loader. We will return if you suggest us to. Thanks !