# Dimension 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 that you want to write your data to.

In this article, we’ll be taking a look at how you can configure and use the *Dimension Loader* object in Astera Data Stack.

### Video

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

### Example

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fg2qO363dAq2UI4Okq7c9%2F01-sample-dimensional-model.png?alt=media\&token=2aa7e3ba-7aba-4d13-92f6-72550c89321a)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FgkDklNA7da8uSxwiq3sp%2F02-toolbox-dimension-loader.png?alt=media\&token=b151090d-2b5b-4728-acaf-c707589c7ddd)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FU7CMCldZEZk3FEKp7uP5%2F16-adding-dimension-loader.gif?alt=media\&token=46bc7f69-ba8e-44e8-94c4-129c9f3cae1e)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FFhGcWLYzLl8OKnS3FIQq%2F03-dimension-loader.png?alt=media\&token=e4e8d607-9582-483c-b074-f21ccd289ea1)

The object is currently empty because we are 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FaGduVXNpbdCXQ53tVWzK%2F04-dimension-loader-properties.png?alt=media\&token=9f011096-eadb-4d57-8423-f9abd8a915b5)

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%2F1o1iDkhqCgRniQ3egJJJ%2F05-configuration-window.png?alt=media\&token=57643599-5296-4999-90ae-ae383d464b71)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FMhCnzK1Pc8UMiO6ADCL3%2F06-data-providers.png?alt=media\&token=dd466188-3f2f-4fba-ba6f-ed5aea1171cd)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FDTJRywUYz4qmqYmKqq5t%2F07-astera-data-model.png?alt=media\&token=4485314c-71f3-4450-a311-b356ee3bcbc8)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F4kKkfNIkHKB4BRkhnIYr%2F08-astera-data-model.png?alt=media\&token=5373be79-0f0b-46d4-bdea-9a2b0333c22c)

{% 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FE5oZYrrt9cA03Oof3XZF%2F09-astera-data-model.png?alt=media\&token=06fb5ccc-35d7-4319-94ae-6817836b4303)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fs3Eo3d6PIqDFtxcTUEJA%2F10-pick-table.png?alt=media\&token=b7b3c18a-ff64-48f9-88e0-de012fbf40c9)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F95drJqV0Pz57juw9BMvE%2F11-pick-dimension-table.png?alt=media\&token=2dab95d5-483e-40ff-8621-5c2a14cfc38e)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FaHumn90kHOVpueRVdX46%2F12-pick-dimension-table.png?alt=media\&token=03cafff1-a2dd-497a-8fa5-c22d01473634)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FFXD3VDTp4Mf5eNdtHMHa%2F13-dimension-loader-layout-builder.png?alt=media\&token=5f0e7bdd-124a-4dcc-a850-b09c4ef16084)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fo745eAWtGZAujpmRVxmw%2F14-dimension-loader-object.png?alt=media\&token=f190d1fc-8ab4-40d8-8c4d-5de66c06435f)

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* object to extract data from the source deployment, and then map the relevant fields to the *Dimension Loader* object.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FlX0OZL6D7GMkj07JTT9p%2F15-dimension-loader-dataflow.png?alt=media\&token=5a999fdb-c1f0-4164-bc11-392600bc577e)

To learn more about the *Database Table Source* object, click [here](https://documentation.astera.com/astera-data-stack-v10/dataflows/sources/database-table-source).

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

This concludes our discussion on the *Dimension Loader* object in Astera Data Stack.
