# Continuous metrics

## What will we learn on this article?

This article explains **continuous metrics** and how they enhance advanced [use cases](/joule/use-case-enablement.md) by integrating live metrics within stream processing.

You will learn how Joule uses DuckDB to generate, store and manage these metrics, with examples like business dashboards and dynamic customer promotions.

## What are continuous metrics?

Combining live metrics within stream processing context provides a powerful tool **to build advance use cases**.

Functions such as:

* ML model predictions
* Analytic calculations
* Complex rule alerting logic

[Filtering](/joule/components/processors/filters.md) can leverage calculated metrics within the stream processing context.

Continuous metrics are generated **on a scheduled cycle** using captured streaming events. These are stored in-memory for any stream process to use.

{% hint style="info" %}
Stream metrics should not be confused with streaming analytics.\
Streaming analytics will perform insight creation, pattern detection, generate next best action or alert based upon a condition.
{% endhint %}

## How does Joule provide this feature?

Joule embeds an in-memory high performance analytics database, [DuckDB](https://duckdb.org/), to provide the core analytical function.

The necessary supporting capabilities are provided with the following additional functions:

* Scheduled metric generation
* Table management
* Metric priming and export
* Data access API's
* Event capture

## Use case examples

The following use cases apply metrics in slightly different methods.

1. **Business dashboards** calculates and distributes whereas
2. **Dynamic customer promotions** adjusts customer purchase promotions based upon general buyer activity and live market conditions.&#x20;

### **Business dashboards**

Understanding intraday business activity is essential for various functions in today's competitive market.

By leveraging analytical insights and live metrics, businesses can **shift from being reactive to applying proactive measures focused** on the next best action.

[Metrics](/joule/components/processors/enrichment/metrics.md) play a crucial role in making this shift possible.

### **Dynamic customer promotions**

Dynamically adjusting promotions **based on market conditions**, inventory levels and customer buying behaviour can significantly impact product pricing.

By combining [in-motion metrics](/joule/components/processors/enrichment/dynamic-contextual-data.md) with customer purchase history and intent, tailored promotions can be offered to customers.

Real-time metrics create a consistent approach for these scenarios by collecting and calculating key variables within a specific time frame.


---

# 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.fractalworks.io/joule/concepts/continuous-metrics.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.
