> For the complete documentation index, see [llms.txt](https://docs-v3.toucantoco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v3.toucantoco.com/data-management-in-datahub/using-advanced-data-concepts/data-personnalisation-with-user-attributes/connector-setup-with-a-user-attribute.md).

# Connector setup with a user attribute

In this section, we'll explore the seamless process of configuring connectors to dynamically connect to specific servers based on user attributes. This functionality proves especially beneficial in scenarios involving a single-tenant data architecture, where data is distributed across various servers corresponding to different users.

{% hint style="info" %}
It's highly recommended as an App-builder to be **connected with an account that has the user attributes** used that are set. This ensures a smooth and efficient configuration process.
{% endhint %}

Let's dive into an illustrative example of how to configure a connector to establish a connection with a PostgreSQL server based on user context. The key to achieving this lies in template-based configuration, specifically manipulating the HOST field while referencing the user attribute “pg\_host”.

* Create a new connector, or edit an existing connector.
* Configure the connector following the example below, by referring to the variable for the HOST field.

  <figure><img src="/files/oZ25ZRMBp9oC4tYYuife" alt=""><figcaption></figcaption></figure>

More on variable syntaxes in this [page](/data-management-in-datahub/using-advanced-data-concepts/advanced-syntax-for-variables.md#user-attributes).

{% hint style="info" %}
If you are not connected with a user that has those attributes that are set, you can make the choice to use conditional templating syntax (given in the linked page above).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-v3.toucantoco.com/data-management-in-datahub/using-advanced-data-concepts/data-personnalisation-with-user-attributes/connector-setup-with-a-user-attribute.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
