> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/guides/output-module/the-output-module-query-language/filtering-operators/exists-not-exists-filter.md).

# EXISTS/NOT\_EXISTS filter

In the context of a graph query, the `EXISTS` filter tests the existence of a relationship with another entity. This is the only filter that is explicitly limited to filtering on an entity located directly under the filtered node. To specify which relation should exist/not exist, the filter has a `target` key.

You can also pass a parameter to the EXISTS filter. This parameter is used as a secondary filtering element. To query the assets with an attribute of type `Description`, use the EXISTS filter on the asset with target value `Attribute` and also the Id of the `Description` type in the `value` key of the filter.

The table below lists the possible target values and the expected value type for optional parameters.

| Filtered Entity          | Target value             | Optional Parameter | Description                                                                                                                                 |
| ------------------------ | ------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Community, Domain, Asset | Member                   | Role Id            | Filter resources related/not related to a responsibility. Optionally, only responsibilities related to the Role Id.                         |
| Asset                    | Relation                 | RelationType Id    | Filter assets that are/are not the source or target of a relation. Optionally, only relations related to the RelationType Id.               |
| Asset                    | RelationSource           | RelationType Id    | Filter assets that are/are not the "source " of a relation. Optionally, only relations related to the RelationType Id.                      |
| Asset                    | RelationTarget           | RelationType Id    | Filter assets that are/are not " target" of a relation. Optionally, only relations related to the RelationType Id.                          |
| Asset                    | Attribute                | AttributeType Id   | Filter assets that have/do not have an attribute. Optionally, only attributes related to the AttributeType Id.                              |
| Asset                    | StringAttribute          | AttributeType Id   | Filter assets that have/do not have a StringAttribute. Optionally, only StringAttributes related to the AttributeType Id.                   |
| Asset                    | SingleValueListAttribute | AttributeType Id   | Filter assets that have/do not have a SingleValueListAttribute. Optionally, only SingleValueListAttributes related to the AttributeType Id. |
| Asset                    | MultiValueListAttribute  | AttributeType Id   | Filter assets that have/do not have a MultiValueListAttribute. Optionally, only MultiValueListAttribute related to the AttributeType Id.    |
| Asset                    | BooleanAttribute         | AttributeType Id   | Filter assets that have/do not have a BooleanAttribute. Optionally, only BooleanAttributes related to the AttributeType Id.                 |
| Asset                    | NumericAttribute         | AttributeType Id   | Filter assets that have/do not have a NumericAttribute. Optionally, NumericAttributes related to the AttributeType Id.                      |
| Asset                    | DateAttribute            | AttributeType Id   | Filter assets that have/do not have a DateAttribute. Optionally, only DateAttributes related to the AttributeType Id.                       |

{% hint style="info" %}
The EXISTS/NOT\_EXISTS filters are exclusively for communities, domains and assets.
{% 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://developer.collibra.com/api/guides/output-module/the-output-module-query-language/filtering-operators/exists-not-exists-filter.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.
