# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FEMfsRRIlGCaFa0icgf0I%2F1.png?alt=media\&token=e52322e2-a3de-4434-896c-9131568af763)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FIU370oj3ReA0FqKAfaJg%2F2.gif?alt=media\&token=78119242-d6e3-4aad-aaa6-31b59a6eb8a8)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FLOrOdMd8E4wJxsbdMcI8%2F3.png?alt=media\&token=349f1961-a910-4b23-a5e0-60627516a42b)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FeKzV0vKN7689UEDzUNCC%2F4.png?alt=media\&token=0f7c9d0a-f06e-440a-87f4-271c7d43a6ed)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FJwAfyfVywWi1vgtLmScV%2F5.png?alt=media\&token=911c45c3-f25b-4508-a2fb-d4a6286a6380)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FgwGbQD6IpHlOacaGa7qk%2F6.png?alt=media\&token=24378e58-8668-45ed-bc49-c6d29f23af11)

{% 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3UlZb4FSzVZX4NbHGMsp%2F7.png?alt=media\&token=a66c5eda-4477-4839-a749-14334a58eca5)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fvlfy2CFRdCn2WeQzJLFA%2F8.png?alt=media\&token=500b27d4-d637-44ce-9acf-0f9af3b30c25)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FVvL6aYPfCmVFP4SKFbTv%2F9.png?alt=media\&token=5775c997-da6a-4635-980b-c6650f402385)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FQkjtwMlchHY0g1j0rbZB%2F10.png?alt=media\&token=c7320685-3102-4128-8093-dc9d6a645b79)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FAS3CA5HeQAnBR8tXdLpt%2F11.png?alt=media\&token=68b4fea4-153a-45ff-9e42-56fe1fc10069)

*Link* entity:

* Requires users to map business keys of the related Hubs

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FKZvOSovDFwJ3iiqYJYW5%2F12.png?alt=media\&token=c4a41a87-b5f4-4f98-98fb-d3ae712b08ff)

*Satellite* entity:

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F2aacLFarjnpKeF4FPxj3%2F13.png?alt=media\&token=d20f7c39-bbee-4384-a573-f6cb9d128d27)

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