# Make a slug

Shape / columns

A variant of [Clean up text](https://meridian.online/operations/clean-up-text).

Turn text into a lowercase identifier with no spaces or punctuation, fit for a URL or a column name.

Page: <https://meridian.online/operations/clean-up-text/make-a-slug>

## Status

Runs as a SQL step.

arcform carries it as a `sql:` step today.

## The DuckDB step

turn text into a lowercase slug

```sql
CREATE TEMP TABLE raw AS SELECT * FROM (VALUES
  (1, 'Café Déjà vu: 2026 Edition!'), (2, '  Bob   Okafor  '), (3, 'Carla Díaz')
) t(id, title);
CREATE TEMP TABLE result AS
SELECT id, trim(regexp_replace(lower(strip_accents(title)), '[^a-z0-9]+', '-', 'g'), '-') AS slug FROM raw;
SELECT * FROM result ORDER BY id;
SELECT CASE WHEN ((SELECT list(slug ORDER BY id) FROM result) = ['cafe-deja-vu-2026-edition', 'bob-okafor', 'carla-diaz']) THEN 'as expected' ELSE error('the three titles did not become lowercase slugs of letters, digits and single hyphens') END AS verdict;
```

The statement builds its own data.

It needs nothing installed beyond DuckDB itself.

## What other tools call it

Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).

- Bruin: [`bruin.slugify(value)`](https://getbruin.com/docs/bruin/assets/templating/macros.html) (read 2026-09-27)
- dbt-utils: [`slugify`](https://raw.githubusercontent.com/dbt-labs/dbt-utils/main/README.md) (read 2026-09-27)
- Duckle: [`Slug`](https://github.com/slothflowlabs/duckle/blob/f85f8960edfb6efbf4cb89d58a7b32e16df0e867/frontend/src/workflow-ui/palette-data.ts) (read 2026-09-25)
