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

> ## Agent Instructions
> Cognite Data Fusion (CDF) is an industrial DataOps platform. Prefer English docs unless the user asks for another locale.
> Follow /_llms/ index links recursively until you reach page URLs ending in .md. Fetch those Markdown twins instead of HTML.
> For REST APIs, default to calendar version 20230101 (stable). Use 20230101-beta or 20230101-alpha only if the user is on a preview API. Cite paths under /api-reference/concepts/<version>/ and the Cdf-Version header. Prefer the Python SDK (cognite-sdk) unless the user is in JavaScript/TypeScript.
> Start here by task: platform overview /cdf/index.md; data modeling /cdf/dm/index.md; data integration /cdf/integration/index.md; access /cdf/access/index.md; CDF Toolkit /cdf/deploy/cdf_toolkit/index.md; REST quickstart /dev/quickstart.md; Python SDK https://cognite-sdk-python.readthedocs-hosted.com/en/stable/; Atlas AI /cdf/atlas_ai/concepts/index.md; Flows apps /cdf/flows/index.md; MCP and IDE setup /dev/guides/ide_ai_integration.md.
> For implementation work, also load /skill.md.

# About time series types

> Learn about numeric, string, and state time series in Cognite Data Fusion (CDF), when to use each type, and which aggregates each type supports.

Every time series in CDF has a type: **numeric**, **string**, or **state**. You set the type when you create the time series, and you can't change it later. The type determines which values a data point can hold, how CDF interprets the time between data points, and which aggregates you can request.

## Compare the time series types

Numeric, string, and state time series differ in the values they store, how CDF validates and interpolates them, and which aggregates they support.

| Characteristic | Numeric | String | State |
| - | - | - | - |
| **Value** | Number | UTF-8 text | Integer (`numericValue`) and string label (`stringValue`) |
| **Validation** | None | None | Validated against the state set |
| **Interpolation** | Linear or stepwise, set by `isStep` | Always stepwise | Always stepwise |
| **Aggregates** | Common and numeric aggregates | Common aggregates | Common and state aggregates |

For the aggregates in each group, see [Aggregates by time series type](https://docs.cognite.com/dev/concepts/aggregation.md#aggregates-by-time-series-type).

## Choose a time series type

Pick the type based on what the values represent and how you want to analyze them:

* Use **numeric** when each value is a measured or calculated quantity, such as temperature, pressure, flow rate, or a production KPI.
* Use **state** when the values come from a known, finite set of conditions, such as `ON`/`OFF` or `RUNNING`/`IDLE`/`ERROR`. CDF rejects values outside the set and can calculate how often and how long equipment is in each state.
* Use **string** for free-form text that doesn't fit a fixed set, such as diagnostic messages, batch identifiers, or firmware versions.

## Numeric time series

Set the `isStep` property to match how the measured process behaves. Use `isStep: true` for values that hold until the next data point, such as setpoints and counters, and `isStep: false` for values that change gradually, such as most physical measurements. CDF uses `isStep` for interpolation and for time-weighted aggregates such as `average`. You can change `isStep` after you create the time series. For how each interpretation affects the results, see [Stepwise vs continuous](https://docs.cognite.com/dev/concepts/aggregation.md#stepwise-vs-continuous).

## String time series

Each string value can be up to 1023 bytes when UTF-8 encoded. CDF stores values exactly as you ingest them: an empty string is a valid value and is different from a missing data point, and `"OK"` and `"Ok"` are two different values.

## State time series

Each state time series references a **state set** that defines its valid states. To learn how to define state sets, ingest state data points, and analyze state changes, see [State time series](https://docs.cognite.com/dev/concepts/resource_types/state_timeseries.md).

## Set the type when you create a time series

Set the `type` property on the `CogniteTimeSeries` view to `numeric`, `string`, or `state`. A state time series also needs a `stateSet` property. See [State time series](https://docs.cognite.com/dev/concepts/resource_types/state_timeseries.md#create-state-time-series).

```http title="Create a numeric time series" wrap theme={"languages":{"custom":["/_languages/kuiper.json"]}}
POST /api/v1/projects/{project}/models/instances
Content-Type: application/json

{
  "items": [
    {
      "space": "industrial_assets",
      "externalId": "pump_001_pressure",
      "instanceType": "node",
      "sources": [
        {
          "source": {
            "type": "view",
            "space": "cdf_cdm",
            "externalId": "CogniteTimeSeries",
            "version": "v1"
          },
          "properties": {
            "name": "PT-1001",
            "description": "Discharge pressure measured at the outlet of pump 001",
            "type": "numeric",
            "isStep": false,
            "unit": {
              "space": "cdf_cdm_units",
              "externalId": "pressure:bar"
            }
          }
        }
      ]
    }
  ]
}
```

For more information, see [Time series in data modeling](https://docs.cognite.com/cdf/dm/dm_guides/dm_integrate_with_time_series.md).

## Next steps

> [card] [Aggregation](https://docs.cognite.com/dev/concepts/aggregation.md)
>
> Learn how CDF calculates each aggregate and how granularity works.

> [card] [State time series](https://docs.cognite.com/dev/concepts/resource_types/state_timeseries.md)
>
> Define state sets, ingest state data points, and analyze state changes.

> [card] [Time series in data modeling](https://docs.cognite.com/cdf/dm/dm_guides/dm_integrate_with_time_series.md)
>
> Create time series as `CogniteTimeSeries` instances in your data model.

> [card] [Time series and data points](https://docs.cognite.com/api-reference/concepts/20230101/time-series-data.md)
>
> Insert, retrieve, and query data points with the API.
