Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fuuid.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fuuid.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `uuid`

Warning

`uuid` is deprecated.

<!-- -->

<!-- -->

Use [\`randomUuid\`](https://coralogix.com/docs/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"

}
```
