---
title: "uuid_extract_version function in Strata | Oplema"
description: "Get the version number of a UUID, such as 7, to check which kind of UUID a value is. Write it as uuid_extract_version(uuid) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/uuid-extract-version"
updated: "2026-11-04"
---

# uuid\_extract\_version

Extract a version for the given UUID.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **BIGINT**.

### Expression

```
uuid_extract_version('01965bfd-2b56-7a0a-9c2f-49a449a84527'::UUID)
```

### Result

```
7
```

The expression returns `UINTEGER`. Formula stores it as `BIGINT` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 7 |

## Arguments and types

```
uuid_extract_version(uuid)
```

**uuid**

UUID

Supported signatures (1)

```
uuid_extract_version(uuid: UUID) → UINTEGER
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[uuid\_extract\_timestamp

Extract the timestamp for the given UUID v7.

](https://oplema.com/docs/strata/functions/uuid-extract-timestamp)[gen\_random\_uuid

Return a random UUID v4, such as 7e7ea35f-f813-46ce-ac7b-12658c021bcb.

](https://oplema.com/docs/strata/functions/gen-random-uuid)[uuid

Return a random UUID v4, such as 7e7ea35f-f813-46ce-ac7b-12658c021bcb.

](https://oplema.com/docs/strata/functions/uuid)[uuidv7

Return a random, time-ordered UUID v7, such as 019482e4-1441-7aad-8127-eec99573b0a0.

](https://oplema.com/docs/strata/functions/uuidv7)

[Browse conversion & identifiers](https://oplema.com/docs/strata/functions#conversion-&-identifiers) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/utility.html#uuid_extract_versionuuid)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
