Codes
Extract alphanumeric codes from the input. Requires WrangleWorks Account.
Extract alphanumeric codes from unstructured text. Can be performed on one column or multiple columns. Requires WrangleWorks Account.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name or list of input columns. | string, integer, array | — | Yes |
output | Name or list of output columns. | string, array | — | Yes |
| Options | ||||
min_length | Minimum length of allowed results. | integer, string | — | No |
max_length | Maximum length of allowed results. | integer, string | — | No |
strategy | Controls filtering of likely false positives such as measurements. Lenient skips this filter; balanced and strict currently apply the same filter. Default is balanced. Unless min_length is provided, minimum lengths default to 3 for lenient, 4 for balanced, and 5 for strict. | string; one of:
| — | No |
disallowed_patterns | A pattern or JSON array of regex patterns to not include in the found codes. | string | — | No |
include_multi_part_tokens | Whether to include multi-part tokens that have a space. Default True. | boolean | — | No |
extract_raw | Whether to return tokens with their adjacent non-whitespace characters included, rather than the cleaned token. Default False. | boolean | — | No |
| Formatting | ||||
first_element | Get the first element from results. | boolean | false | No |
output_format | Format of the extract output. | string, null; one of:
| null | No |
char | Character to use when output_format is concatenate. | string | ", " | No |
sort_order | Default is input order. Also allows longest or shortest. | string; one of:
| — | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name. | array, object | — | No |
Examples
# One column input
wrangles:
- extract.codes:
input: Secret
output: Code Extract
| Secret |
|---|
| to gain access use Z1ON0101 |
| Code Extract |
|---|
| ['Z1ON0101'] |
# Multi column input
wrangles:
- extract.codes:
input:
- code1
- code2
output: Codes
| code1 | code2 |
|---|---|
| code CH465517080-1 | code CH465517080-2 |
| Codes |
|---|
| ['CH465517080-1', 'CH465517080-2'] |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | Yes |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 24 |
| Catalog key | extract.codes |
| Recipe key | extract.codes |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | extract |
| Documentation group | extract |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.extract.codes |
| Legacy UUID | da591387-0fca-4842-8bcb-d19f561f0292 |
Sources