Skip to main content

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​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName or list of input columns.string, integer, array—Yes
outputName or list of output columns.string, array—Yes
Options
min_lengthMinimum length of allowed results.integer, string—No
max_lengthMaximum length of allowed results.integer, string—No
strategyControls 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:
  • lenient
  • balanced
  • strict
—No
disallowed_patternsA pattern or JSON array of regex patterns to not include in the found codes.string—No
include_multi_part_tokensWhether to include multi-part tokens that have a space. Default True.boolean—No
extract_rawWhether to return tokens with their adjacent non-whitespace characters included, rather than the cleaned token. Default False.boolean—No
Formatting
first_elementGet the first element from results.booleanfalseNo
output_formatFormat of the extract output.string, null; one of:
  • list
  • columns
  • concatenate
nullNo
charCharacter to use when output_format is concatenate.string", "No
sort_orderDefault is input order. Also allows longest or shortest.string; one of:
  • input
  • longest
  • shortest
—No
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues 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
code1code2
code CH465517080-1code CH465517080-2
Codes
['CH465517080-1', 'CH465517080-2']
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountYes
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID24
Catalog keyextract.codes
Recipe keyextract.codes
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespaceextract
Documentation groupextract
AliasesNone
Runtime symbolwrangles.recipe_wrangles.extract.codes
Legacy UUIDda591387-0fca-4842-8bcb-d19f561f0292

Sources