# Variable Resolver

### Functionality

You can define variable resolvers to help you resolve expressions in the following format:

```highlight
#{name:key:element}
```

* `name`: The name of the metadata element to use to resolve the variable
* `key`: The key or path to use to retrieve the value.
* `element`: In case the value retrieved is in JSON form, we can pick one of the values out of it (OPTIONAL)

{% hint style="warning" %}
An error in resolving a variable does not lead to a failure on the level of a pipeline or workflow.
{% endhint %}

{% hint style="info" %}
Because of usability reasons, errors are not immediately shown in the user interface. It would become impossible to type in any expression because of it. Check the log in the [Hop GUI](/data-shaper-1.21/index-1/hop-gui.md) execution pane to see any errors thrown back by the resolvers.
{% endhint %}

{% hint style="info" %}
If you find that typing in variable expressions in a table view (table grid) is too slow, uncheck the option to resolve variables in tooltips in the [configuration perspective](/data-shaper-1.21/knowing-the-data-shaper-designer/index/perspectives/perspective-configuration.md).
{% endhint %}

### Nested resolving

Suppose you have a variable with its value being a resolve expression. In that case you’ll notice that when you ask for the value of the variable, the variable resolver also is being used.

For example, you can have a `PASSWORD` variable pointing to value `p@55w0rd` in a development environment, and to a secrets vault in production by setting `PASSWORD` to a resolver expression like:

```highlight
#{vault:secret/data/database:password}
```

When executing a pipeline or workflow, the value of variable `PASSWORD` will then first be resolved to the expression and then, using the variable resolver called `vault`, the password is retrieved from the secrets vault.

{% hint style="warning" %}
For now, the variable resolver is not doing any more nested resolving to avoid complications like infinite loops.
{% endhint %}

### Plugins

Here are the available variable resolver plugins:

* [Pipeline variable resolver](/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/index/pipeline-variable-resolver.md)
* [Hashicorp Vault variable resolver](/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/index/vault-variable-resolver.md)
* [Google Secret Manager Variable Resolver](/data-shaper-1.21/knowing-the-data-shaper-designer/index-2/index/google-secret-manager-variable-resolver.md)


---

# 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/index-2/index.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.
