Skip to content

Commands

Nathan Dickerson edited this page Nov 5, 2016 · 26 revisions

Before You Start

  • In order to run the tool, you must have the JAR file extracted from the zip file, a .properties file and a CSV file.
  • Before running the tool, open the command prompt and navigate to the Data Loader project.
  • All commands need to be prefaced with dataloader

Template

Using the "template" command allows a user to generate a template for the entity passed in the command line arguments. To generate a template for a particular entity, you will need the name of the supported entity.

The generated template file will have the naming scheme of <Entity>Example.csv. This file will be located inside your current directory.

The template file is populated with two rows:

  • The first row contains all fields (headers) that are found within our REST-SDK for that particular entity. These columns are not all required, they are only meant as potential columns you could include in your particular CSV input file.

    • Some fields are association fields. These can be identified by the "." in the field, for example: categories.id. The associated field (the right side of the ".") can be changed to any field in that associated type, for example: categories.name. DataLoader uses this associated field to find the associated record(s) to associate to the entity that is being inserted/updated in each row. In general, you will want to change associated fields to something other than the default Bullhorn internal ID field.
  • The second row contains the data types associated with each field. This row is for reference purposes only as you construct the CSV input file with your actual data.

Load

dataloader load path/to/.csv

For example: dataloader load C:/Projects/dataloader/data/JobSubmission.csv

dataloader load path/to/directory

For example: dataloader load C:/Projects/dataloader/data

Using the "load" command you are able to insert new records and update existing records in the Bullhorn CRM. To load a csv file using DataLoader you will need to have the name of the supported entity you are loading at the beginning of the csv file name (eg Candidate.csv, ClientContactForDataLoader.csv). If the entity name is not specified at the beginning of the file name an unknown entity error will occur.

Delete

dataloader delete path/to/.csv

For example: dataloader delete C:/Projects/dataloader/data

dataloader delete path/to/directory

For example: dataloader delete C:/Projects/dataloader/data/JobSubmission.csv

The command is used to delete records from Bullhorn based on a file or directory with files. The records can be deleted either by specifying an external ID or the Bullhorn-assigned ID. See Load Insert vs Update above for more information on specifying the external ID or the Bullhorn-assigned ID.

ConvertAttachments

dataloader convertAttachments path/to/.csv

For example: dataloader convertAttachments C:/Projects/DataLoader/Candidate.csv

The "convertAttachments" command gives the capability to convert a locally stored file to html. The supported file types that can be converted are: txt, doc/x, opend, odt, rtf, html and pdf. The format of the CSV dataloader will be reading from is identical to the format of the CSV for LoadAttachments.

When convertAttachments is run, a new folder will be created named convertedAttachments. Within this folder a subfolder will be created which will be named after the entity these converted attachments are to be associated to, such as Candidate. Within this entity folder will be the converted attachments. The name of each attachment will be the same as the externalID of the record to which the attachments will be associated, such as <ExternalID>.html which needs to be associated in the CSV dataloader reads from.

An isResume column is required in order for files to be converted. If a row contains the value 1 or true in the isResume cell, that row will be converted. If you have more than one file for the same entity with isResume set to true, only the last one will be used.

This action will need to be followed by the load command. When the load command is run, dataloader will check the convertedAttachments folder that was created and load any converted attachments that match an externalID in the CSV being read from.

All converted attachments will be pasted into the description field of the entity. Currently, the only supported entities to load converted attachments are: Candidates, ClientContacts and ClientCorporations.

LoadAttachments

dataloader loadAttachments path/to/.csv

For example: dataloader loadAttachments C:/Projects/DataLoader/Candidate.csv

The "loadAttachments" command allows you the ability to load a file stored locally to an existing record in the Bullhorn CRM. Within the CSV, the relativeFilePath column of the file attachment you are uploading and attaching must be specified along with the selector field (for example: candidate.externalID) of the entity the attachment is to be associated with.

Since the attachment process is updating an existing entity and not inserting a new entity, the <Entity>ExistField in the properties file must be set. The <Entity>ExistField property must match the selector column in the CSV file. An example of this format can be seen in the examples/loadAttachments folder. Before the CandidateAttachFile.csv example will work (which has the first column: candidate.externalID), you must uncomment the line: candidateExistField=externalID in the properties file.

DeleteAttachments

dataloader deleteAttachments path/to/.csv

For example: dataloader deleteAttachments C:/Projects/DataLoader/Candidate.csv

The "deleteAttachments" command provides the ability to delete a file stored to an existing record in the Bullhorn ATS/CRM system.

Help

When the help command is invoked a list of suggested actions will be returned and the format required for each action.

Clone this wiki locally