# Dimension Table Loader

The *Dimension Loader* object in the *Data Warehouse* section of the toolbox allows you to write data to a dimension table. You can connect to a deployed dimension model and then choose a dimension table in which you want to write your data.

## **Video**

{% embed url="<https://youtu.be/-GQrC5n6oUY>" %}

## **Example**

Here, we have a sample dimensional model that has been deployed to the server.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FYEDfgfWfaW8rS3g9GToT%2F0.png?alt=media)

This model contains four dimension entities, one fact entity, and a date dimension entity. In this example, we’ll be loading data into the *Customer* dimension using the *Dimension Loader* object.

## **Configuring the Dimension Loader Object**

1. To get the *Dimension Loader* object from the toolbox, go to *Toolbox > Data Warehouse > Dimension Loader*.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F6FoIAoIsZd7JNwm5ztJT%2F1.png?alt=media)

2. Drag and drop the *Dimension Loader* object onto the dataflow designer.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FU7DA5dE5hoRodNbphN0O%2F2.gif?alt=media)

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FKKWgIOdmYgoHyRtjeDJq%2F3.png?alt=media)

The object is currently empty because we have yet to configure it.

3. To open the properties window of the *Dimension Loader* object, right-click on it and select *Properties* from the context menu. Alternatively, you can double-click on the object.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F9TlBQ3SnVk3uBkqUT44Y%2F4.png?alt=media)

A configuration window will appear on your screen.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F5YlRnV16jy7uxekiJHdU%2F5.png?alt=media)

Using this window, you can configure the *Dimension Loader* object.

4. On the *Database Connection* screen, you can choose a data provider from the options available in the *Data Provider* dropdown menu.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FHzG6ozbMPSJ6uHQNJaTu%2F6.png?alt=media)

Since the dimension entities are present in the deployed dimensional model, we’ll select the *Astera Data Model* from the list of data providers.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FEsNGWqBon9WSOtrhXb3F%2F7.png?alt=media)

Once you’ve provided your Astera Data Stack credentials, you can select a deployed model from the *Database* dropdown menu.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FqOnYcSDFClG1saaQSUPd%2F8.png?alt=media)

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

In this case, we’ll select *DW\_Sale*, which represents the dimensional model that we saw earlier.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FhQ5U9tTCdpGFQsAUxRCW%2F9.png?alt=media)

Once you’ve chosen a deployed model, click *Next*.

5. On the *Pick Table* screen, you can pick a table from the dimension entities present in the deployed model that you’ve chosen.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F28svEw5blEToEUUyky82%2F10.png?alt=media)

The *Pick Table* dropdown menu allows you to choose from the dimension entities.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FeDmxZEJKm5Ww5KBro4h4%2F11.png?alt=media)

In this case, we’ll choose the *Customer* table from the list.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FIhSQldTdfjQFbwodize2%2F12.png?alt=media)

Once you’ve chosen a dimension table, click *Next*.

6. On the *Layout Builder* screen, you can view the layout of the entity, including the characteristics and roles of each field. However, you cannot modify the layout of the entity from this screen.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FnvBxEI1Ks39lQyAy7kWl%2F13.png?alt=media)

Click *OK* to close the configuration window.

The *Dimension Loader* object has now been configured and you’ll be able to see all of the fields in the object layout.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2Fs1iYwenXvBIASCqBIVJo%2F14.png?alt=media)

You can now map the incoming source data to each relevant field.

7. Choose a relevant source object from the toolbox and configure it so as to extract the source data. In this case, we’ll use a [*Database Table Source*](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/sources/database-table-source) object to extract data from the source deployment, and then map the relevant fields to the *Dimension Loader* object.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FVs8Wr0LYwobEchbDWXD1%2F15.png?alt=media)

You can now run the dataflow to load data into the dimension table.
