> 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/youprep-data-filtering-with-a-user-attribute.md). Agents can also search and read this documentation through its [MCP server](https://docs-v3.toucantoco.com/~gitbook/mcp).

# YouPrep data filtering with a user attribute

In this section, we'll explore the process of enhancing your data security through dynamic row-level filtering **with YouPrep**. By utilizing user attributes, you can efficiently filter tables and implement robust row-level security. This feature proves invaluable, especially in scenarios involving a multi-tenant data architecture where data for all users is consolidated within a single table.

{% 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. If you are not connected with a user having those user attributes, the variables won't be listed in YouPrep.
{% endhint %}

Let's delve into the steps to seamlessly achieve this dynamic row-level filtering and fortify your data management within Toucan environment:

* Add a “Filter rows” step\
  ![](https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-c0419b867a9f5247b4416950b6b7de1e5cbc128a%2FCapture%20d%E2%80%99e%CC%81cran%202024-07-01%20a%CC%80%2016.02.49.png?alt=media)
* Select the column to filter on, and then click on the “Variable” icon and select the user attribute (customer\_id in the example below).\
  ![](https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-0f736bf154e240e15f369d532b4a29dd77867f65%2Ffilter_rows_2.png?alt=media)

{% hint style="info" %}
Note that there is also a **dedicated feature called** [**Permissions**](https://docs-v3.toucantoco.com/data-management-in-datahub/datasets-in-toucan/setting-permissions-on-dataset.md), that allows to configure Row-Level-Security on datasets.
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
