Skip to main content

Format


Formatting Wrangles are convenient for transforming data in terms of case, padding, and merge/split.

Click here to learn how to use Format Wrangles in a recipe.

Case

Change the case of the input.

Tabset​

Example​

CONVERT TO LOWER CASE

→

convert to lower case

lower_case.gif

Options​

OptionExample
UpperUPPER CASE
Lowerlower case
TitleTitle Case
SentenceSentence case

Coalesce

Merges multiple columns into one, only merging the first non-empty values in the column; "first" being from left to right. Useful if you have multiple columns with similar data but only need one column.

Click here to learn how to use Coalesce Wrangles in a recipe.

Tabset​

Example​

header1header2header 3
ahello
2hi
hey

→

new column
a
2
hey

Collapse to JSON

Merge multiple columns into JSON strings.

Tabset​

Example​

To Array​

header1header2
a1
b2
c3

→

["header1","header2"]
["a",1]
["b",2]
["c",3]

To Object​

For objects the column headers will be used as the keys and must be unique.

header1header2
a1
b2
c3

→

 
 {"header1":"a","header2":1} 
 {"header1":"b","header2":2} 
 {"header1":"c","header2":3} 

Options​

OptionDescription
To ArrayCreate an array e.g. ["value1", "value2"]
To ObjectCreate an object. This requires column headers, which will be used as the keys. e.g. {"header1": "value1", "header2": "value2"}.

Concatenate

Merges multiple columns into one. All columns are combined together sequentially.

Click here to learn how to use Concatenate Wrangles in a recipe.

Tabset​

Example​

abc

→

abc

Options​

OptionDescription
DelimiterOptional character(s) to be added between the input columns

Expand JSON

Expand JSON strings into multiple columns.

Tabset​

Example​

From Array​

["header1","header2"]
["a",1]
["b",2]
["c",3]

→

header1header2
a1
b2
c3

From Object​

For objects, the keys will be used as the new column headers.

 
 {"header1":"a","header2":1} 
 {"header1":"b","header2":2} 
 {"header1":"c","header2":3} 

→

header1header2
a1
b2
c3

Merge JSON

Merge multiple JSON objects or arrays together into one object or array.

Tabset​

Example​

Merge Array​

Array 1Array 2
["a", "b"][1, 2]
["c", "d"][3, 4]
["e", "f"][5, 6]

→

Merge Array
["a", "b", 1, 2]
["c", "d", 3, 4]
["e", "f", 5, 6]

Merge Object​

Object 1Object 2
 {"Key1": "a","Key2": 1}  {"Key3": "d", "Key4": 4} 
 {"Key1": "b","Key2": 2}  {"Key3": "e", "Key4": 5} 
 {"Key1": "c","Key2": 3}  {"Key3": "f", "Key4": 6} 

→

Merge Object
 {"Key1": "a","Key2": 1, "Key3": "d", "Key4": 4} 
 {"Key1": "b","Key2": 2, "Key3": "e", "Key4": 5} 
 {"Key1": "c","Key2": 3, "Key3": "f", "Key4": 6} 

Options​

OptionDescription
Merge ArrayMerge JSON arrays into one array e.g. ["value1"], ["value2"] -> ["value1", "value2"]
To ObjectMerge JSON objects into one. e.g. {"header1": "value1"}, {"header2", "value2"} -> {"header1": "value1", "header2", "value2"}.

Pad

Pad text to a fixed length. Useful for IDs that must follow a specific format. You can choose between two options, Leading and Trailing and also have the option of character and length.

format_pad.gif

Tabset​

Example​

Length = 10 | Char = 0 | Pad = Leading​

12345

→

0000012345

Options​

OptionDescription
Leading / TrailingWhether to append the characters to the start or end of the input
LengthThe fixed length of the output text
CharThe character(s) to be appended to pad up to the total length

Prefix/Suffix

Adds a prefix or suffix to selected columns.

prefix.gif

Tabset​

Example​

Value = DEMO-​

Part Number
12345
54321
67890
09876

→

Part NumberPrefix
12345DEMO-12345
54321DEMO-54321
67890DEMO-67890
09876DEMO-09876

Options​

OptionDescription
Prefix/SuffixWhether to add a prefix or a suffix to the input
ValueThe value of the prefix or suffix

Split

Splits an input into multiple columns.

Click here to learn how to use Split Wrangles in a recipe.

Tabset​

Example​

a,b,c

→

abc

split.gif

Options​

OptionDescription
DelimiterThe character(s) that the input will be split on

Trim

Removes excess whitespace from the start and end of text.

Tabset​

Example​

'    trim me    '

→

'trim me'

Truncate

Truncate text to take a snippet from longer text.

Tabset​

Example​

Length = 3 | Trunc = Right​

Data
abcdefghi

→

Right
ghi

Options​

OptionDescription
LengthThe desired length of the snippet you want to extract
LeftKeep the characters starting from the beginning of the text
RightKeep the characters starting from the end of the text

Note: Negative numbers can be used to truncate the opposite of the selected direction (Left/Right).