# Closure

## ![](/files/xGSM6UfKkiodacXgZh8E) Closure

### Description <a href="#description" id="description"></a>

The Closure transform allows you to generate a Reflexive Transitive Closure Table for the Mondrian OLAP engine. For more information on how a closure table can help Mondrian gain performance, go here Technically, this transform reads all input rows in memory and calculates all possible parent-child relationships. It attaches the distance (in levels) from parent to child.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

### Options

| Option              | Description                                                                          |
| ------------------- | ------------------------------------------------------------------------------------ |
| Transform name      | The name that uniquely identifies the transform.                                     |
| Parent ID field     | The field name that contains the parent ID of the parent-child relationship.         |
| Child ID field      | The field name that contains the child ID of the parent-child relationship.          |
| Distance field name | The name of the distance field that will be added to the output                      |
| Root is zero        | Check this box if the root of the parent-child tree is not empty (null) but zero (0) |


---

# 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.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/closure.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.
