# Vault Loader Overview

Vault Loader allows you to load data to your Vault or extract data from your Vault in bulk. Loader is particularly useful during migrations and on-boarding. Extracted information downloads to a .CSV file, which you can load back into your Vault or into other systems.

## Enabling Vault Loader {#enable-vault-loader}

To enable Vault Loader, navigate to  **Admin > Settings > General Settings** and select the **Enable Vault Loader UI** checkbox. Once enabled, the **Loader** tab appears in the Vault's primary tab collection. The location of the **Loader** tab may differ in Vaults where Vault Loader was previously enabled.

_Vault Owners_ can access Vault Loader by default; other users require the [necessary permissions][1].

## Vault Loader Actions

Vault Loader provides the extract and load actions below.

### Extract Actions

<a href="/en/gr/31536/">Extract actions</a>
 allow you to export document, object, user, and group metadata into a .CSV file. <a href="/en/gr/31536/#object-types">Batch size limits</a>
 apply when using extract actions.

### Load Actions

Load actions allow you to import .CSV files to create, update, and delete documents, objects, users, groups, and their related metadata.

The .CSV file inputs for most load actions do not have a limit for the number of rows. Object record role load actions are limited to 500 rows. All .CSV files for load actions must be under 1GB in size. .CSV file inputs that contain special characters must use UTF-8 encoding.

The following load actions are available:

* Create and update <a href="/en/gr/26605/">documents</a>

* Create and delete <a href="/en/gr/67267/">document attachments</a>

* Create and delete <a href="/en/gr/43263/">document relationships</a>

* Create and update <a href="/en/gr/26915/">document renditions</a>

* Assign and remove users and groups from <a href="/en/gr/26613/">document roles</a>

* Create <a href="/en/gr/26911/">document versions</a>

* Create <a href="/en/gr/31993/">documents, versions, and roles</a>

* Create and update <a href="/en/gr/26609/">legacy users</a>

* Create and update <a href="/en/gr/26611/">groups</a>

* Create, update, and delete <a href="/en/gr/26607/">object records</a>

* Create and delete <a href="/en/gr/67288/">object record attachments</a>

* Assign and remove users and groups from <a href="/en/gr/76401/">object record roles</a>


## Concurrent Loader Jobs {#concurrent-loader-jobs}

Users can initiate concurrent Loader jobs, which Vault processes asynchronously by queuing them. Vault starts Loader jobs if the POD it is located on has open slots to run jobs, otherwise they are queued for processing in the order submitted.

## Sequential Loader Tasks {#sequential-loader-tasks}

When used via the <a class="external-link " href="https://developer.veevavault.com/api/26.1/#multi-file-load" target="_blank" rel="noopener">Vault Loader API<i class="fa fa-external-link" aria-hidden="true"></i></a>, a single job can contain up to ten tasks, which can be for the same or different Objects and Documents. The tasks within a single Loader job are always processed sequentially, and data from the previous tasks are committed to Vault. This allows users to load in Parent and Child records in a single job as different tasks.

## Notifications & Output Files {#loader-notifications-outputs}

Vault shows the status of Loader jobs in **Admin > Operations > Job Status** and also sends notifications for both successes and failures. The notification and job details display whether or not _No Triggers_ was used in Record Migration Mode. Admins can <a href="/en/gr/2157/">modify the notification message templates</a>
 if needed.

## Success & Failure Log Files {#about-success-and-failure-logs}

After each load, Vault creates separate success and failure logs as .CSV files. You can download these files from the Vault notification or email notification. Vault deletes these files after 16 days. Both files contain the system-managed `id` values of each record.

If you select the **Include fields in output log** checkbox when loading, Vault queries the fields and validates that the fields were successfully created.


<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If a <a href="/en/gr/62987/#vault-loader-limits">raw object record</a>
 encounters a <a href="/en/gr/28740/#define-uniqueness-relationships-objects">uniqueness constraint</a>
 error during a Loader job that creates, updates, or deletes records, the entire batch fails.</p>
    </div>
  </div>
</div>



### Failure Logs

Failure logs include the following information:

* Error messages for each record that failed to load
* Original data alongside corresponding errors
* Row IDs from the original .CSV file for the corresponding row
* Lines that Vault Loader skipped due to a mismatch in column counts

You can review and fix errors from within the error log. Once you correct any errors, you can re-import the failure log.

#### Unexpected Errors

Occasionally, something such as a server restart may happen while a Vault Loader job is running that prevents the system from detecting the status of one or more records. In this case, you may see the following message in the failure logs:

`An unexpected error occurred. Please verify the status of this record and reload if necessary.`

To resolve this, check the status of the affected record(s) manually and reload them if needed.

## About the Vault Loader Command Line Tool

With the Vault Loader command line tool, you can manage files and folders on your Vault's file staging, load data to your Vault, or extract data from your Vault directly from the command line. Learn more about <a href="/en/gr/26627/">
using the Vault Loader Command Line Tool</a>
.

## How to Use File Staging {#ftp}

See <a href="/en/gr/38653/">Accessing Your Vault's file staging</a>
 to learn about connecting. Note that you must use UTF-8 encoding in your .CSV files.

### How to Use File Staging for Inputs {#ftp-input}

To reference files:

  1. Connect to file staging for your Vault.
  2. Upload files. You can put these in the root directory or in your personal subdirectory. You can also create a new subdirectory for them.
  3. Add the _file_ column to your .CSV input and enter the path/name of each file relative to file staging's root directory, for example, _u60613/Dec-2015-Batch/Gludacta_Brochure.pdf_.

### How to Use File Staging for Extracts {#ftp-extract}

When Vault Loader exports files as part of an extract, you can find those files on file staging. The .CSV output includes the _file_ column that shows the filename and location, relative to file staging's root directory. When an export includes documents or document versions with multiple rendition types and you select the _Include Renditions_ checkbox, the .CSV output includes a separate row for each rendition type.

If you are not a _Vault Owner_ or _System Administrator_, folder names may be hidden to you. You can locate your user ID by accessing **Admin** > **Users & Groups** > **Vault Users**. The Vault users list displays a column that shows your user ID. You can also run the following VQL query: `SELECT id, username__sys FROM user__sys WHERE (username__sys = 'john.doe@mydomain.com')`.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Vault file staging can store any number of files but the maximum number displayed is 64,998. Extracted files and folders on file staging are automatically deleted every 72 hours by default. This auto-deletion timeframe does not apply to files that users upload to file staging.</p>
    </div>
  </div>
</div>



## Migration Mode {#migration-mode}

To add document <a href="/en/gr/26911/">versions</a>
 or <a href="/en/gr/26915/">renditions</a>
, or to set <a href="/en/gr/645/">document numbering</a>
 during import, you must select the **Document Migration Mode** checkbox.

To create or update object records in any lifecycle state or state type and with minimal validation, or set standard and system-managed fields such as _Created By_, you must select the <a href="/en/gr/761685/">**Record Migration Mode**</a>
 checkbox. To bypass record triggers, select **No Triggers**.

## Auditing

Starting with the 24R3 release, Vault no longer tracks Vault Loader actions in the <a href="/en/gr/14341/#system">System Audit History</a>
, including data export. These changes were previously tracked in Vault releases 18R3 to 24R2. Actions that occurred after your Vault upgraded to 18R3 and before it upgraded to 24R3 will still appear in the System Audit History.

In all releases, Vault Loader actions on documents appear in the Document Audit History, and actions on object records appear in the Object Record Audit History.



## About the User Object {#about_the_user_object}

You can use Vault Loader to <a href="/en/gr/26607/">create and update _User_ records</a>
 with the `user__sys` object. This allows you to update custom fields on _User_ records, as well as standard fields such as _Manager_. Because Vault synchronizes _User_ records with <a href="/en/gr/26609/">Legacy User</a>
 accounts, Vault automatically updates Legacy User accounts when you create or update _User_ records.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Usernames are case sensitive. Entering usernames with incorrect capitalization may result in account creation or update failures.</p>
    </div>
  </div>
</div>



## Related Permissions {#permissions}

By default, only Vault Owners have access to Vault Loader. To extend this functionality to other users or groups, assign them to a custom security profile that includes the permissions below.

To perform any actions through Vault Loader, users must also have the correct access for the action. For example, users cannot update documents on which they do not have role-based permissions or create users without the appropriate security profile.

Additional permissions and restrictions apply for <a href="/en/gr/38653/#staging_server_permissions">file staging access</a>
.

| Type | Permission Label | Controls |
| --- | --- | --- |
| Security Profile | _Application: Vault Owner Actions: Vault Loader_ | Grants ability to use the Loader tab. Users must have both this permission and _Application: API: Access API_ to download files. |
| Security Profile | _Tabs: Loader: View_ | Grants the ability to view the Loader tab. |
| Security Profile | _Application: API: Access API_ | Grants the ability to run API commands via Vault Loader. Users must have both this permission and _Application: Vault Owner Actions: Vault Loader_ to download files. |

[1]: #permissions