Data Types & Retention
Learn about data types for Datastreams, storage retention options, and how they affect your platform credit usage.
When creating a Datastream, you need to choose a data type and set a retention period. These settings determine how your data is stored and how much of your platform credits it will consume.
Data Type
Each Datastream must have a data type that defines what kind of values it can hold. Choosing the correct data type ensures that incoming data is properly structured and can be used correctly in workflows and dashboards.
| Data Type | Description | Example |
|---|---|---|
| Float | A decimal number with fractional part | 25.5, -3.14, 100.0 |
| Integer | A whole number (no decimal point) | 25, -10, 0, 1000 |
| Boolean | A true/false value | true, false |
| String | A text value | "online", "error", "active" |
| DateTime | A timestamp in ISO 8601 format | 2026-01-15T10:30:00Z |
| JSON | A structured JSON object | {"status": "ok", "temp": 22} |
| Array | A list of values | [1, 2, 3], ["a", "b"] |
Choose the data type that best matches the kind of data your device or API will send. Using the wrong type can cause data to be stored incorrectly or workflows to fail.
Retention Period
The retention period defines how long a Datastream stores its historical data. After the retention period expires, old values are automatically deleted.
Warning: Retention Directly Affects Your Credit Usage
Storing data for a longer period consumes more of your platform credits. The amount of data you store — combined with how long you keep it — can significantly impact your credit balance.
Consider the following:
- Short retention (e.g., 7 days) — uses minimal credits, suitable for data you only need for recent monitoring.
- Medium retention (e.g., 30 days) — moderate credit usage, good for weekly trend analysis.
- Long retention (e.g., 90+ days) — uses a large amount of credits, only choose this if you truly need long-term history.
If your device sends data frequently (e.g., every minute) and you set a long retention period, your credit usage can grow very quickly. Always balance your need for historical data against the cost in credits.
Naming Your Datastream
Give your Datastream a clear and descriptive name. This name is used throughout the platform — in dashboards, workflows, API calls, and AI agent context.
A good name is:
- Specific —
room_temperatureinstead oftemp - Consistent — use the same naming pattern across similar devices
- Easy to understand — anyone (or any AI) should know what the Datastream represents at a glance
Description
Add a description to every Datastream to explain what it represents and how it is used.
Info: Descriptions Power Your AI Agent
All the information you provide in Datastream descriptions is used by AI agents on the platform. The more detailed and accurate your descriptions are, the better your AI agent can understand, interpret, and act on your data.
Always write clear, thorough descriptions so your AI agent has the full context it needs. This is one of the most important things you can do to make your automation smarter and more reliable.
A good description includes:
- What the Datastream represents — e.g., "Current water tank level in percent"
- The unit of measurement — e.g., "Values are in degrees Celsius"
- Any relevant thresholds or ranges — e.g., "Values range from 0 to 100"