---
title: Extract numbers
description: Extract numerical values from text columns using customizable modes.
category: Text Processing
tags: [number extraction, text parsing, decimal, regex, data transformation]
---

# Extract numbers

## Description

The **Extract Numbers** activity scans a text column and extracts numeric values using various extraction modes. It supports multiple formats such as plain numbers, currency amounts, scientific notation, and even expanded notations (e.g., `5K → 5000`).

> **Use case**:  
> Extracting invoice amounts, order IDs, and numeric metrics from unstructured strings such as "Order #1234, Amount: $45.67" or "Salary: 120K".

---

## Input

| Type | Description                      |
| ---- | -------------------------------- |
| Data | Dataset containing a text column |

---

## Output

| Type             | Description                                                       |
| ---------------- | ----------------------------------------------------------------- |
| Transformed Data | Original or enhanced data with numeric values extracted from text |

---

## Configuration Fields

| Field Name           | Required    | Description                                                                                                                                                                                                                                                  |
| -------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Column**           | Yes         | Name of the text column from which to extract numbers                                                                                                                                                                                                        |
| **Extract Mode**     | Yes         | Extraction strategy:<ul><li>**Several** – Extract all numbers separately</li><li>**JSON Array** – Store as an array</li><li>**Expand Notation** – Convert notation like 1K to 1000</li><li>**Decimal Separator** – Handle regional decimal formats</li></ul> |
| **Output Column**    | Yes         | Name of the column to store the extracted numbers                                                                                                                                                                                                            |
| **Include Original** | No          | Whether to keep the original column in the final output                                                                                                                                                                                                      |
| **Separator**        | Conditional | Character used to split values (only shown when `Extract Mode` is **Decimal Separator**)                                                                                                                                                                     |

---

## Sample Input

| Transaction Details            |
| ------------------------------ |
| Order #1234, Amount: $45.67    |
| Invoice 56789 - $120.50        |
| Product ID: 998, Price: $30.00 |

---

## Sample Configuration

| Field            | Value               |
| ---------------- | ------------------- |
| Column           | Transaction Details |
| Extract Mode     | Several             |
| Output Column    | Extracted Numbers   |
| Include Original | Yes                 |
| Separator        | Not Applicable      |

<!-- ![alt text](extract-numbers-img.png) -->

---

## Sample Output

| Transaction Details            | Extracted Numbers_1 | Extracted Numbers_2 |
| ------------------------------ | ------------------- | ------------------- |
| Order #1234, Amount: $45.67    | 1234                | 45.67               |
| Invoice 56789 - $120.50        | 56789               | 120.50              |
| Product ID: 998, Price: $30.00 | 998                 | 30.00               |

---
