---
title: "typeof function in Strata | Oplema"
description: "Get the name of an expression's data type, such as VARCHAR, to check what a column holds. For example, typeof('abc') returns 'VARCHAR'."
url: "https://oplema.com/docs/strata/functions/typeof"
updated: "2026-11-04"
---

# typeof

Return the name of an expression's data type.

## Try an expression

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

### Expression

```
typeof('abc')
```

### Result

```
'VARCHAR'
```

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 | VARCHAR |

## Arguments and types

```
typeof(expression)
```

**expression**

Any value

Supported signatures (1)

```
typeof(expression: ANY) → VARCHAR
```

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

## Things to know

### With a missing first argument

```
typeof(NULL::VARCHAR)
```

'VARCHAR'

## Related functions

[CAST

Convert a value to another data type; invalid conversions raise an error.

](https://oplema.com/docs/strata/functions/cast)[TRY\_CAST

Convert a value to another data type, returning a missing value if conversion fails.

](https://oplema.com/docs/strata/functions/try-cast)[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)

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

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