---
title: "left function in Strata | Oplema"
description: "Return the first characters of text, up to the given count. Write it as left(string, count) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/left"
updated: "2026-11-04"
---

# left

Return the first characters of text, up to the given count.

## Try an expression

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

### Expression

```
left('Hello🦆', 2)
```

### Result

```
'He'
```

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

## Arguments and types

```
left(string, count)
```

**string**

Text

**count**

Number

Supported signatures (1)

```
left(string: VARCHAR, count: BIGINT) → VARCHAR
```

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

[left\_grapheme

Extracts the left-most count grapheme clusters.

](https://oplema.com/docs/strata/functions/left-grapheme)[lpad

Add a character to the left of text until it reaches a given length. Longer text is cut from the right to that length.

](https://oplema.com/docs/strata/functions/lpad)[right

Return the last characters of text, up to the given count.

](https://oplema.com/docs/strata/functions/right)[right\_grapheme

Extracts the right-most count grapheme clusters.

](https://oplema.com/docs/strata/functions/right-grapheme)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#leftstring-count)

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