# `randomUuid`

## Description

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

## Syntax

```dataprime
randomUuid(): 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:

```json
{
"path": "/home",
"domain": "coralogix.com",
"full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU="
}
```

You can assign a new UUID with:

### Example query

```dataprime
create request_id from randomUuid()
```

### Example output

```json
{
"path": "/home",
"domain": "coralogix.com",
"full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU=",
"request_id": "37367559-35f4-459c-943e-19025765da15"
}
```
