---
title: uuid
description: |

  Returns a randomly generated UUID, useful for assigning identifiers to documents.
url: https://coralogix.com/docs/dataprime/language-reference/functions-reference/uuid/
product: dataengine
feature: DataPrime Language
feature_id: dataprime-language
feature_identifier: dataengine/dataprime-language
last_updated: '2026-10-21'
---

# `uuid`

Warning

`uuid` is deprecated.

<!-- -->

<!-- -->

Use [\`randomUuid\`](https://coralogix.com/docs/dataprime/language-reference/functions-reference/uuid/randomuuid.md) instead.

## Description

Returns a randomly generated UUID, useful for assigning identifiers to documents.

## Syntax

```
uuid(): string
```

## Example

**Use case: Add unique identifiers to documents**

Suppose you have log documents that do not include a `request_id`. You can generate one automatically. Consider this document:

```
{

"path": "/home",

"domain": "coralogix.com",

"full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU="

}
```

You can assign a new UUID with:

### Example query

```
create request_id from uuid()
```

### Example output

```
{

"path": "/home",

"domain": "coralogix.com",

"full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU=",

"request_id": "37367559-35f4-459c-943e-19025765da15"

}
```
