The Vault Loader Command Line tool allows you to perform all bulk create, export, update, and delete actions from the terminal. You can also view and manage files and folders on your Vault’s file staging server.
The process has three basic steps:
- Open a command line console.
- Use the command line tool to authenticate with your Vault.
- Use the command line tool to load data via an input file or to export data from your Vault.
Loading Basics
When you load content and data into Vault:
- You must specify an input file in CSV format. The file extension can be CSV or TXT.
- Input files must include all required fields and can include any additional editable fields that you wish to update.
- Optional: Upload any document source files and renditions to the file staging server. If you don’t add source files, documents will be created as placeholders.
- Optional: You can use a mapping file to match fields in an existing data file with an input file.
Using the Key Field in Mapping Files
When you use a mapping file to Update, Upsert, or Delete object records, you can use the KeyField column name in your CSV. When specified, Vault uses this field as the idParam for lookup. If you specify both IdParam and Keyfield, Vault uses Keyfield for lookup.
Extracting Basics
When retrieving information from Vault:
- You must specify a filename for the output file using the
-csv
flag. All output files are plain text and CSV-formatted. - Optional: You can use a
""
command with specific field values to filter the items included in your extract. - Optional: You can specify a location for the output file. Otherwise, the file will be created in your current directory.
- Optional: You can specify a column layout. Otherwise, the file will include all fields and their values.
Currently, the command line tool can export object records, document metadata, document types, users, and groups.
Responses
After processing a command via the command line tool, Vault creates various response files in your current directory.
- Success log: CSV file with fields and values for successfully loaded records.
- Failure log: CSV file with error messages for each record that failed to load.
- Output file: CSV file with exported data.
You can use the success, failure, and export files to edit and reload records as needed.
If you are performing an action using the -async
flag, you can use the following commands to retrieve status information:
Action | Description |
-jobstatus | Use this action to retrieve status information (job ID, progress, start time, end time, etc.) for all operations that you've run via the command line tool since generating the VL-Config file. |
-jobstatus [JOB_ID] | Use this action to retrieve status information (progress, start time, end time, etc.) for a specific operation. |
-jobresults [JOB_ID] | Use this action to create a success or failure log and a text file with the job details, including progress, start time, and end time. |
Getting Started
The command line tool is distributed as a single JAR file (VaultDataLoader.jar) and does not require installation. Simply download the ZIP file, extract it and run it from a command line console. You’ll need Vault Loader permissions to do this.
Download the command line tool from the Loader tab in your Vault. When Vault releases new versions, you’ll need to download the latest file. Extract (unzip) the downloaded file.
Verify that you have installed Java JDK V7 or higher. If not, download the latest version.
Recommended: Create a local directory for Vault Loader-related files. This can help you keep track of various files:
- Command line tool (VaultDataLoader.jar)
- Vault DNS and authentication information (vl-config.xml)
- CSV input files
- CSV success and failure logs
- CSV or TXT export files
Note: To take advantage of functionality available in later versions, the command line tool uses Vault Loader v21.3 or later:
- The command line tool downloaded from Vault version 21R3.0 or earlier uses Vault Loader v21.3, which passes v21.3 through to underlying APIs. For example, the 21R2.0 command line tool will use Vault Loader v21.3 and the v21.3 Vault Objects, Documents, and VQL APIs.
- The command line tool downloaded from Vault version 22R1.0 or later uses the equivalent version of Vault Loader, which passes the Vault version through to underlying APIs. For example, the 22R2.0 command line tool will use Vault Loader v22.2 and the v22.2 Vault Objects, Documents, and VQL APIs as specified.
Command Line Arguments
A command line argument is a parameter passed to Vault Loader. When using Vault Loader, arguments include both commands that define what operation to perform, like -createdocuments
, and modifiers for that operation, like -all
to specify that a delete operation would affect all object records or -csv filename.csv
to indicate that Vault Loader should create documents based on the information in the specified CSV file.
A full list of arguments is available via the command line tool using the argument -h
or -help
.
Learn more about Vault Loader command line arguments in the Vault Loader Command Line Tool Reference.
To use command line arguments to view and manage files and folders on your Vault’s staging server, see the Vault Loader File Staging Command Line Tool Reference.
Authentication & VL-Config Files
Before running any other commands, use your Vault username and password to authenticate with your Vault:
java -jar VaultDataLoader.jar -username steve@veepharm.com -password p@$$w0Rd -dns https://veepharm.veevavault.com
The first time that you run this command, the command line tool creates the file vl-config.xml, which saves your DNS and username for future commands. If you work with multiple Vaults or multiple user accounts, you must delete this file and re-run the authentication command each time you switch Vaults or switch users.
Note: To authenticate, you must have a security profile that grants these permissions:
- Vault Owner Actions: Vault Loader
- API: All API