# Creating link dimensions

Dimensions organize attributes and measures so that users can answer business questions quickly. The most common dimension used is a time dimension, but dimensions are also used to classify people (such as customers), geographical places, and product lines.

Shared Dimensions are dimensions which can be shared for later use. Shared dimensions are particularly useful if you are connected to a Pentaho Repository or your workstation is shared by different users. They allow you to define and save your annotations, and then share them with other users. The Link Dimension annotation allows you to reuse a previously created [shared dimension](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/work-with-the-streamlined-data-refinery/use-the-streamlined-data-refinery/building-blocks-for-the-sdr/using-the-shared-dimension-step-for-sdr.md). For example, if you want to create a generic dimension for reuse, such as a standard time dimension, you can create a Shared Dimension and then link directly to that dimension's key. Linking to the dimension key will import all hierarchies from the Shared Dimension into your data model, resulting in a star schema which joins the shared dimension table to the fact table.

When creating a shared dimension, you will need to select a field to use as a Dimension Key which allows you to identify and use the Shared Dimension in your transformation. For example, in the Shared Dimension step, you can select the field **Year** and annotate it as a **Dimension Key**. You may also select the field **Year** again along with the fields **Month** and **Week** to annotate as attributes. Then, in theAnnotate Stream step, select the field **Year** to annotate as a **Link Dimension**. Here, select the Shared Dimension previously created using the **Year** field. All annotations defined in the Shared Dimension will be populated in run time. When the model is published, the annotations **Year**, **Month**, and **Week** will be in the model.

**Note:** If you are using link dimensions as part of your Streamlined Data Refinery (SDR) process, be aware that link dimension annotations are dependent on shared dimensions, and shared dimensions cannot use a data service for their source. Therefore, if you select a Pentaho Data Service as the source of your model in the [Build Model job entry](https://github.com/pentaho/documentation/blob/main/PDIA/10.2/PDI/Advanced%20Pentaho%20Data%20Integration%20topics/Advanced%20topics%20\(Pentaho%20Data%20Integration%20overview\)/Work%20with%20the%20Streamlined%20Data%20Refinery/Use%20the%20Streamlined%20Data%20Refinery/Building%20blocks%20for%20the%20SDR/Use%20the%20Build%20Model%20job%20entry%20for%20SDR=GUID-7FAB840B-9B79-440E-AE59-31C3F5B5EACA=4=en=.md), the link dimensions which you have defined here will not be linked to your model. See [Pentaho Data Services](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services.md) for more information about data services.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/work-with-the-streamlined-data-refinery/use-the-streamlined-data-refinery/building-blocks-for-the-sdr/using-the-annotate-stream-step/use-the-annotate-stream-step/creating-link-dimensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
