Attributes
Extract numeric attributes from the input such as weights or lengths. Requires WrangleWorks Account.
Extract numeric attributes from unstructured text such as lengths, voltages, weights, or temperatures. Requires WrangleWorks Account.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the input column. | string, integer, array | — | Yes |
output | Name of the output column. | string, array | — | Yes |
| Options | ||||
responseContent | Span - returns the text found. object - returns an object with the value and unit. | string; one of:
| "span" | No |
attribute_type | Request only a specific type of attribute. | string, null; one of:
| null | No |
desired_unit | Convert the extracted unit to the desired unit. | string, null | null | No |
bound | When returning an object, if the input is a range (e.g. 10-20mm) set the value to return. min, mid or max. Default mid. | string; one of:
| "mid" | 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 |
| 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
wrangles:
- extract.attributes:
input: tools
output: attributes
responseContent: span
| Tools (input) |
|---|
| hammer 5kg, 0.5m |
| Attributes (span )(output) |
|---|
| {'length': ['0.5m'], 'mass': ['5kg']} |
wrangles:
- extract.attributes:
input: tools
output: attributes
responseContent: object
| Tools (input) |
|---|
| hammer 5kg, 0.5m |
| Attributes (Object) (output) |
|---|
| {'length': [{'unit': 'metre', 'value': 0.5}], 'mass': [{'unit': 'kilogram', 'value': 5.0}]} |
wrangles:
- extract.attributes:
input: Tools
output: attributes
responseContent: span
attribute_type: mass # Specific attributes
No sample available.
No sample available.
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | Yes |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 22 |
| Catalog key | extract.attributes |
| Recipe key | extract.attributes |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | extract |
| Documentation group | extract |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.extract.attributes |
| Legacy UUID | 03ccedef-c938-41f1-8980-280f1a91542e |
Sources