---
title: ES|QL TO_DENSE_VECTOR function
description: 
url: https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/type-conversion-functions/to_dense_vector
products:
  - Elasticsearch
---

# ES|QL TO_DENSE_VECTOR function
<applies-to>
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview since 9.2
</applies-to>


## Syntax

![Embedded](https://www.elastic.co/docs/reference/query-languages/esql/images/generated/x-pack-esql/functions/to_dense_vector.svg)


## Parameters

<definitions>
  <definition term="field">
    multi-valued input of numbers or hexadecimal string to convert.
  </definition>
</definitions>


## Description

Converts a multi-valued input of numbers, or a hexadecimal string, to a dense_vector.

## Supported types


| field   | result       |
|---------|--------------|
| double  | dense_vector |
| integer | dense_vector |
| keyword | dense_vector |
| long    | dense_vector |


## Example

```esql
row ints = [1, 2, 3]
| eval vector = to_dense_vector(ints)
| keep vector
```


| vector:dense_vector |
|---------------------|
| [1.0, 2.0, 3.0]     |