# Data Vault Loader

### **Data Vault loader**&#x20;

The *Data Vault Loader* object in the *Data Warehouse* section of the Toolbox allows you to write data to a Data Vault Entity such as a Hub, Link, or Satellite table. You can connect to a deployed model and then choose the entity type and table that you want to write your data to.&#x20;

In this article, we will look at how to configure and use the *Data Vault Loader* object.

#### **Use Case**

For our use case, we will be using the *Data Vault Loader* object to write data to an *Orders* Hub, a *Customers-Orders* Link, and an *Orders* Satellite.

1. To get the *Data Vault Loader* object from the Toolbox, go to *Toolbox > Data Warehouse > Data Vault loader*. &#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/A1OkShxnI3dO0rrnH1rs/1.png)

2. Drag-and-drop the *Data Vault loader* object onto the dataflow designer.&#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/IzqYOcOPILTRAQT8pIUK/2.gif)

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/3eM7YyDTMCv8ZJItlpGy/3.png)

This object is currently empty as it has not been configured yet.&#x20;

3. To configure this object, right-click on the object header and select *Properties* from the context menu. Alternatively, you can also double-click the object header. A configuration window will appear on your screen.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/KgSY0VUgDbpCAIPrSMeV/4.png)

Here, you can configure *the Data Vault loader* object.&#x20;

4. On the *Database Connection* screen, you will notice that the *Data Provider* dropdown menu is limited to just one option: *Astera Data Model*. This option represents the data models that are deployed on the server and are available for usage.&#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/dgdWvW9l7Bx5Rq0rI5oJ/5.png)

5. Once you have provided your credentials and a server connection, you can select a deployed, Data Vault model from the *Database* dropdown menu, which consists of the entities that need to be populated.&#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/wt1clJkeFxD2dMiA800d/6.png)

{% hint style="info" %}
**Note**: The default username is *admin,* and the default password is *Admin123*. &#x20;
{% endhint %}

For our use case, we have selected the DataVault\_Customers\_Orders database which consists of the *Orders* and *Customers* Data Vault entities.

6. Now, click *Next.* On the *Pick Table* screen, you select an entity type: a Hub, Link, or Satellite. First, select the *Hub* entity type.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/lFS0BA13qrmID0agPj9w/7.png)

7. Based on the selected entity, the *Pick Table* dropdown menu dynamically filters out all related tables and their parent entities if any.

* Hub entities do not have any related/attached parent entities.
* Link entities can have related/attached Hub and Bridge tables.
* Satellite entities can have related/attached Hub, Link, and Point-In-Time (PIT) tables.

{% hint style="info" %}
**Note:** Once a Link or Satellite entity has been selected for loading, the Data Vault Loader object will check whether there is data present in the attached/related tables, so that when data is loaded into a Link or Satellite, there are no errors regarding to referential integrity.
{% endhint %}

8. As we have selected the entity type *Hub,* and since *Hub* entities do not have related parent entities, we will simply select the *OrdersHub* table from the drop-down. Once done, click *Next.*&#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/6eCHx6a8xxNOmjPNQvfv/8.png)

9. On the *Layout Builder* screen, you can view the layout of the selected entity, including the characteristics and roles of each field. However, you cannot modify the layout of the entity from this screen.&#x20;

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/qu2PYVor6V9bIzyynp9v/9.png)

10. Now, Click *OK* to close the configuration window. The Data Vault Loader object has now been configured and you will be able to see all fields in the object layout.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/XfSu6Ot4304NihBEBZe3/10.png)

11. You can now map the incoming source data to each relevant, mappable field. This can be done using a relevant source object from the Toolbox and configuring it so as to extract the source data.

{% hint style="info" %}
**Note:** Based on the selected entity (Hub, Link, or Satellite), different fields will appear in the configured *Data Vault Loader* object, and only some of these will be mappable fields. The Load Data Source (*LoadSc)* and Load Date Time (*LoadedDate)* fields are present in all configured Data Vault Loader objects, regardless of the chosen entity.
{% endhint %}

While the Load Date Time field is derived automatically, users will need to provide the relevant source value to the *LoadSc* field. This can be done using variables.

*Hub* entity:

* Requires users to map business keys
* Does not consist of any attributes

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/9oChO7tlbZkWnUfwC7hg/11.png)

*Link* entity:

* Requires users to map business keys of the related Hubs

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/8dVligH8R6oasj6dtYAV/12.png)

*Satellite* entity:

* Consists of attributes, all of which are mappable.
* Consists of a *RecordHash* which is calculated automatically.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/TSGIH90eRFZR6AWaIIbF/13.png)

This concludes using the Data Vault Loader object in Astera Data Stack.
