# originator telemetry

![](/files/cjotCrKP8ONGpR5AK2DW)

Adds Message Originator telemetry values from particular time range that was selected in node configuration to the Message Metadata.

<div align="left"><img src="https://thingsboard.io/images/user-guide/rule-engine-2-0/nodes/enrichment-originator-telemetry-config.png" alt="image"></div>

Telemetry values added to Message Metadata without prefix.

The rule node has three fetch modes:

* FIRST: retrieves telemetry from the database that is closest to the beginning of the time range
* LAST: retrieves telemetry from the database that is closest to the end of the time range
* ALL: retrieves all telemetry from the database, which is in the specified time range.

<div align="left"><img src="https://thingsboard.io/images/user-guide/rule-engine-2-0/nodes/enrichment-originator-telemetry-fetch-mode.png" alt="image"></div>

If selected fetch mode **FIRST** or **LAST**, Outbound Message Metadata would contain JSON elements(key/value)

Otherwise if the selected fetch mode **ALL**, telemetry would be fetched as an array.

{% hint style="info" %}
The rule node can extract a limit size of records into array: 1000 records
{% endhint %}

This array will contain JSON objects with the timestamp and value.

{% hint style="success" %}
End of the interval must always be less than the beginning of the interval.
{% endhint %}

If selected checkbox: **Use metadata interval patterns**, rule node will use Start Interval and End Interval patterns from metadata.

Patterns units sets in the milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC)

![](/files/6fKme2y64d2ij1lCknON)

* If any pattern will be absent in the Message metadata, the outbound message will be routed via **failure** chain.
* In addition, if any pattern will have invalid data type, the outbound message will be also routed via **failure** chain.

Outbound Message Metadata will contain configured telemetry fields if they exist and belong to the selected range.

If attribute or telemetry was not found, it is not added into Message Metadata and still routed via **Success** chain.

To access fetched telemetry in other nodes you can use this template: `JSON.parse(metadata.temperature)`

**Note:** Since TB Version 2.3 the rule node has the ability to choose telemetry sampling order when selected Fetch mode: **ALL**.

<div align="left"><img src="https://thingsboard.io/images/user-guide/rule-engine-2-0/nodes/enrichment-originator-telemetry-order-by.png" alt="imag"></div>


---

# 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.tesenso.com/tesenso-iot-cloud/rule-engine/rule-engine/enrichment-rule-nodes/originator-telemetry.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.
