> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DirectQuery annotations

This section gives you an overview on how you can use the Spring annotations defined in Atoti Market Risk to simplify the configuration when DirectQuery is used.

## How it works

Some Spring annotations have been defined to make the definition of Beans easier. You can define these annotations at the Bean level or at the Class level.

| Annotation | Description |
| - | - |
| `@ConditionalOnAdjustmentsWithDirectQuery` | Annotation used on configuration classes and beans to specify that the read-only adjustments are activated with DirectQuery. Equivalent to `@ConditionalOnSignOffEnabled` and `@ConditionalOnDirectQueryDatabase` |
| `@ConditionalOnDatabricks` | Annotation that can be used to only create a Spring configuration if DirectQuery is set to run with Databricks. |
| `@ConditionalOnDirectQueryCacheDisabled` | This annotation is conditional on the [DirectQuery local cache](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-direct-query/customization-and-internals/caching-side-stores.md) being disabled. |
| `@ConditionalOnDirectQueryCacheEnabled` | This annotation is conditional on the [DirectQuery local cache](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-direct-query/customization-and-internals/caching-side-stores.md) being enabled. |
| `@ConditionalOnDirectQueryDatabase` | This annotation is conditional on DirectQuery being enabled. |
| `@ConditionalOnInMemoryDatabase` | This annotation is conditional on DirectQuery being disabled, that is, on the in-memory datastore being used. |
| `@ConditionalOnMSSQL` | Annotation that can be used to only create a Spring configuration if DirectQuery is set to run with Microsoft SQL Server. |
| `@ConditionalOnNoAdjustmentsWithDirectQuery` | Annotation used on configuration classes and beans to specify that the adjustments are deactivated with DirectQuery and Sign-Off compatibility Equivalent to ConditionalOnSignOffEnabled and ConditionalOnDirectQueryDatabase. |
| `@ConditionalOnSignOffDisabled` | Annotation used on configuration classes and beans to specify that the adjustments and Sign-Off are disabled. |
| `@ConditionalOnSignOffEnabled` | Annotation used on configuration classes and beans to specify that the adjustments and Sign-Off are activated. |
| `@ConditionalOnSignOffHierarchy` | Annotation used on configuration classes and beans to specify that the Sign-Off hierarchy has to be displayed whenever the Sign-Off is really working (in the case of DirectQuery). |
| `@ConditionalOnSnowflake` | Annotation that can be used to only create a Spring configuration if DirectQuery is set to run with Snowflake. |
