# Data Stores

The **Data Stores** page in Platform Settings allows administrators to configure and manage connections to external databases used by Nexus for storing time-series and event data.

Nexus supports three types of data stores for collecting and querying production, operational, and machine data:

* **KQL Databases:** Azure Data Explorer (ADX) and Microsoft Fabric KQL Databases, for advanced time-series analytics.
* **TimescaleDB:** A PostgreSQL-based time-series database, for organizations using open-source or self-hosted data infrastructure.

These data stores serve as the primary backends for collecting and querying production, operational, and machine data captured through devices. Each data store can be configured with one or more **purposes,** supported by Tricloud Nexus:&#x20;

* *Measurements:* A data store that stores time-series measurements and asset hierarchy meta-data.
* *OEE*: A data store that stores operational data for OEE reporting.

By configuring one or more data stores, organizations can ensure flexibility in how and where their data is persisted, making it possible to connect Nexus with enterprise-grade Azure-hosted data services.

These settings require the [Administrator Role](/platform-architecture/security-architecture/user-roles-and-permissions.md) to access and modify.

***

## Key Capabilities

***

### Using Data Stores in Nexus

* **Asset Hierarchies Integration**\
  All configured data stores can be referenced by asset hierarchies, allowing real-time and historical data from devices to be stored and queried.
* **Default Store Behavior**\
  The data store marked as *Default* is preselected whenever a new hierarchy is created. Administrators can later change the target store if necessary.
* **Flexibility Across Environments**\
  Use separate stores for development, testing, and production to manage data independently across environments.

***

## Data Store Purpose

Each data store is assigned one or more purposes, which determine what type of data can be ingested to it. Each purpose also has its own unique data schema (tables, views and more), which can be managed by the platform. The following purposes are available:

* **Measurements:** Ingest time-series measurements from devices via the ingestion pipeline. Used by asset hierarchies for storing raw telemetry, and includes asset hierarchy meta-data.
* **OEE:** Ingest Overall Equipment Effectiveness data computed from production line activity. Used by the OEE extension.

A single data store can serve both purposes. When a new asset hierarchy is created, it is automatically assigned to the default data store configured for the *Measurements* purpose.

## Key Configurations

<figure><img src="/files/h41hkofP7DDYlcSWTsou" alt=""><figcaption><p>Data Stores of Platform Settings</p></figcaption></figure>

The **Data Stores** tab displays a list of all configured data stores with the following details:

***

### Adding a New Data Store

<figure><img src="/files/c8EIzqMmcQwT8gutM30M" alt=""><figcaption><p>Add new Datastore Window</p></figcaption></figure>

To add a new data store:

1. Select **Add**.
2. Provide the required fields:
   * **Display Name:** Friendly name for identifying the store.
   * **Type:** Select *Azure Data Explorer, Microsoft Fabric (KQL Database) or TimescaleDB*.
   * **Purposes:** *Select Measurement or OEE.*
   * *KQL Databases only (ADX og MS Fabric)*
     * **Host Address** – The URL of the Azure Data Explorer Cluster or [Ingestion URL of a KQL Database hosted in MS Fabric](https://learn.microsoft.com/en-us/fabric/real-time-intelligence/access-database-copy-uri).
     * **Database** – Name of the database to be used (this is case-sensitive)
     * **Tenant ID:** The Microsoft Entra tenant id, where a service principal has been created to access the KQL databse.
     * **Client ID:** The Client Id of a Microsoft Entra service principal that is used to access the KQL database. *This service principal must be granted access to the database prior to adding the data store.*
     * **Client Secret:** The Client Secret of a Microsoft Entra service principal that is used to access the KQL database.
   * *TimescaleDB only*
     * **Database:** Name of the database to be used (this is case-sensitive)
     * **Connection String:** The connection string to the database.
3. **Schema Management:** Select *Platform* or *Manuel.*
4. Save the configuration. *Credentials or connection string provided will be checked to ensure access to the database can be granted.*

Once added, the data store becomes available for use in asset hierarchies and/or OEE.

***

### Managing Data Stores

* **Edit** – Update details such as database, credentials, or host address.
* **Delete** – Remove a store that is no longer required (ensure that no active hierarchies depend on it).
* **Set Default** – Define the store that will be used by default for new hierarchies.
* **Schema Management** – For KQL data stores with schema management enabled, opens the schema status dialog where updates can be reviewed and applied.&#x20;

## Managing the Data Schema

For KQL-based data stores (*Azure Data Explorer* and *Microsoft Fabric*), Tricloud Nexus can manage the database schema automatically. The schema defines the tables, views, functions, policies and more that the platform uses when ingesting, storing and querying data.

**Enabling schema management:**\
When creating or editing a data store, enable the Schema Management toggle (located under the Advanced section). When enabled, Tricloud Nexus will verify and apply the schema automatically, ensuring that the latest data schema version is always applied.

**View and applying schema updates:**

1. Select a KQL data store from the list.
2. Click Schema Management in the toolbar.
3. The dialog displays the schema status per configured purpose:

   * **Up to date** - The schema currently applied matches the version bundled with this release.
   * **Update available** - A newer schema version is available. Click Apply Schema to update.
   * **Error** - The last schema application failed. The error details are shown; click Apply Schema to retry.

**Note:** Schema management is currently not available for TimescaleDB data stores.&#x20;


---

# 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.tricloudnexus.io/management-portal/platform-settings/data-stores.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.
