Skip to main content

Create Wrangles

Create wrangles, with recipe examples, parameters, and behavior.

Bins​

Create a column that groups data into bins.

Creates a column that segments and sorts data values into bins. bins can be an integer or a list. When bins is an integer, the input data is split equally into that number of bins. When bins is a list, the input data is split based on the list boundaries.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of input column.string, integer, array—Yes
outputName of new column.string, array—Yes
Options
binsDefines the number of equal-width bins in the range.integer, array—Yes
labelsLabels for the returned bins.string, array, nullnullNo
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​

wrangles:
- create.bins:
input: Data
output: Category
bins: 3
labels:
- Bad
- Medium
- Good
Data
1
7
5
4
6
3
Category
Bad
Good
Medium
Medium
Good
Bad
wrangles:
- create.bins:
input: Grades
output: Letter Grade
bins:
- 0
- 60
- 70
- 80
- 90
- 100
labels:
- F
- D
- C
- B
- A
GradeStudent
64Charles
92Sabrina
76Edward
84Wendy
Letter Grade
D
A
C
B
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID12
Catalog keycreate.bins
Recipe keycreate.bins
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.bins
Legacy UUID232e3ba0-4735-4934-88aa-0163181abb3f

Sources


Column​

Create column(s) with a user defined value. Defaults to None (empty).

Create column(s) with a user defined value. Defaults to None (empty). If you need to copy an existing column, use the copy wrangle instead.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName or list of names of new columns or column_name: value pairs.string, array—Yes
Options
value(Optional) Value(s) to add in the new column(s). If using a dictionary in output, value can only be a string.string, number, object, array, boolean, nullnullNo
value_if_existsDetermines behaviour when the output column already exists. existing (default): leave the column unchanged. coalesce: fill empty/null cells with the new value, keeping non-null cells. new: overwrite the entire column with the new value.string; one of:
  • existing
  • coalesce
  • new
"existing"No
coalesce_valueOnly used when value_if_exists is coalesce. Determines which side is preferred when both the existing and new values are non-empty. existing (default): keep the existing value, only fill empty/null cells with the new value. new: keep the new value, only fall back to the existing value where the new value is empty/null.string; one of:
  • existing
  • new
"existing"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​

wrangles:
- create.column:
output: New Column
value: new value # Optional, otherwise empty
where: column > 1
column
1
2
3
New Column
new value
new value
wrangles:
- create.column:
output:
- New Column 1: new value 1 # Optional, otherwise empty
- New Column 2: new value 2
- New Column 3: new value 1
column
1
2
3
New Column 1New Column 2New Column 3
new value 1new value 2new value 1
new value 1new value 2new value 1
new value 1new value 2new value 1
wrangles:
- create.column:
output:
- New Column:
- 4
- 5
- 6
column
1
2
3
New Column
[4, 5, 6]
[4, 5, 6]
[4, 5, 6]

Columns of empty lists can also be created by passing an empty list ([]) as the column value.

Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID13
Catalog keycreate.column
Recipe keycreate.column
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.column
Legacy UUID5a18e2c8-ec7c-45f5-88fd-bb5c358a8b40

Sources


Embeddings​

Create an embedding based on text input.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputThe column of text to create the embeddings for.string—Yes
outputThe output column the embeddings will be saved as.string, nullnullNo
Options
taskThe task type for the embedding model. Only applicable for the Jina provider. Selects the appropriate task-specific adapter.string, null; one of:
  • retrieval.query
  • retrieval.passage
  • text-matching
  • classification
  • separation
nullNo
Formatting
output_typeOutput the embeddings as a numpy array or a python list Default - python list.string; one of:
  • numpy array
  • python list
"python list"No
precisionThe precision of the embeddings. Default is float32. This should be used with output_type numpy array.string; one of:
  • float16
  • float32
"float32"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
Execution
batch_sizeThe number of rows to submit per individual request.integer100No
threadsThe number of requests to submit in parallel. Each request contains the number of rows set as batch_size.integer10No
Errors
retriesThe number of times to retry if the request fails. This will apply exponential backoff to help with rate limiting.integer0No
Details
api_keyThe API key.string—Yes
modelThe specific model to use to generate the embeddings.string"text-embedding-3-small"No
urlThe endpoint to send embedding requests to. Defaults to the standard endpoint for the resolved provider. Setting a Jina URL without an explicit provider will automatically use Jina's request/response format.string"https://api.openai.com/v1/embeddings"No
providerControls the request/response format for the embedding API. When omitted, inferred from url (jina.ai → jina, otherwise openai). Setting provider also sets the default url for that provider, so you only need one of provider or url for standard endpoints. Use both together only when pointing to a custom endpoint that uses a non-default provider's API format (e.g. a Jina-compatible proxy).string, null; one of:
  • openai
  • jina
nullNo

Examples​

wrangles:
- create.embeddings:
input: my_column
api_key: ${my_key}
output: embeddings
my_column
angle grinder
jig saw
embeddings
[0.010793785, -0.010007165, 0.0028609, -0.0139...]
[-0.008975127, 0.009314879, -0.024150735, -0.0...]
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID14
Catalog keycreate.embeddings
Recipe keycreate.embeddings
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.embeddings
Legacy UUIDe3518afd-a819-40ec-8b49-eb25690220c1

Sources


GUID​

Create column(s) with a GUID.

Create a column with a GUID (Globally Unique Identifier).

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName or list of names of new columns.string, array—Yes
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​

wrangles:
- create.guid:
output: GUID Column

# OR

- create.uuid:
output: GUID Column

No sample available.

GUID Column
9a13b4dd-1993-4bd2-8974-3f9a0f006d86
1528d918-ecd7-457c-b44d-3d30705696d3
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID15
Catalog keycreate.guid
Recipe keycreate.guid
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.guid
Legacy UUIDcf3aaab2-3d5b-4c9b-826e-7af7510521c9

Sources


Hash​

Create a hash of a column.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of input column.string, integer, array—Yes
outputName of new column.string, array—Yes
Options
methodThe method to use to hash the input (Default: md5).string; one of:
  • md5
  • sha1
  • sha256
  • sha512
"md5"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​

wrangles:
- create.hash:
input: Description
output: hash
method: md5
Description
The wrench is blue
The hammer is yellow
New Column
ce114e4501d2f4e2dcea3e17b546f339
a54d88e06612d820bc3be72877c74f257b561b19
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID16
Catalog keycreate.hash
Recipe keycreate.hash
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.hash
Legacy UUID11e8fc13-00d2-4779-8d87-6288b07de7e7

Sources


Index​

Create column(s) with an incremental index. e.g. 1,2,3...

Create a new incremental index.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName or list of names of new columns.string, array—Yes
byOptional. Cluster the created indexes by one or more columns.string, array, nullnullNo
Options
start(Optional; default 1) Starting number for the index.integer1No
step(Optional; default 1) Step between successive rows.integer1No
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​

wrangles:
- create.index:
output: New Index
start: 1 # optional
step: 1 # optional

No sample available.

New Index
1
2
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID17
Catalog keycreate.index
Recipe keycreate.index
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.index
Legacy UUID0a4909ca-6e14-4da7-8a70-a7fd106d6944

Sources


Jinja​

Output text using a jinja template.

Makes use of a Jinja template to create a description, title, or summary based on your data.

info

Jinja templates do not allow variables with spaces. This wrangle automatically replaces spaces in column headers with underscores, so use underscores instead of spaces when referencing columns in the template.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName of the column to be output to.array—Yes
inputSpecify a name of column containing a dictionary of elements to be used in jinja template. Otherwise, the column headers will be used as keys.string, nullnullNo
Options
templateA dictionary which defines the template/location as well as the form which the template is input. If any keys use a space, they must be replaced with an underscore. Note: spaces within column names are replaced by underscores (_).object—Yes
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​

wrangles:
- create.jinja:
output: Description
template:
string: |
This is a {{ Brand }} {{ Item_Type }} that is {{ Size }}
SizeBrandItem Type
10mmSKFball bearing
15mmTimkenbearing seal
Description
This is a SKF ball bearing that is 10mm
This is a Timken bearing seal that is 15mm

Using | in YAML denotes a multi-line string that preserves line breaks. Use > for a multi-line string when line breaks should not be preserved.

Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID18
Catalog keycreate.jinja
Recipe keycreate.jinja
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.jinja
Legacy UUID10fc6709-16d4-4eab-8f56-6cb5d170ea66

Sources


UUID​

Create column(s) with a UUID.

Create a column with a UUID (Universally Unique Identifier).

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName or list of names of new columns.string, array—Yes
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​

wrangles:
- create.guid:
output: GUID Column

# OR

- create.uuid:
output: GUID Column

No sample available.

GUID Column
9a13b4dd-1993-4bd2-8974-3f9a0f006d86
1528d918-ecd7-457c-b44d-3d30705696d3
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID19
Catalog keycreate.uuid
Recipe keycreate.uuid
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.uuid
Legacy UUIDc376f3ff-2283-4c4c-8d7f-70db6f53ed19

Sources