Field Types. Data Formatting and Normalization
Data normalization is the process of structuring parsed data. You may want to eliminate unwanted spaces and special characters, convert comma-separated numbers to decimal-separated etc.
This can be done using Field Types. Parsio supports 8 built-in types:
- Multi-line Text
- Single-line Text
- Raw ("Keep as Source")
- Downloadable Document (URL)
- Date and Time
Note that these settings are defined at the Mailbox level, e.g. all the templates in the mailbox will share the same types for the same fields.
1. Multi-line Text
The Multi-line Text type comes with a couple of post-processing operations:
- Remove all the HTML tags from the found text.
- Decode HTML entities to their corresponding characters (e.g. & will become & etc).
Example: an anchor tag
<a href="https://example.com" target="_blank">Click Here</a> will be converted to "Click Here".
This field type preserves paragraphs.
2. Single-line Text
The Single-line Text type is similar to Multi-line Text but removes all the line breaks keeping the value as a single paragraph.
3. Keep as Source
The Raw field type ("Keep as source") simply keeps the found value "as is" without any additional formatting.
4. Downloadable Document
The Downloadable document allows to parse external documents. If the parsed value is a valid URL, Parsio will try to download the linked document: PDF file, HTML page, Excel, CSV, DOCX etc.
The file must be publicly available, e.g. you should not enter login / password to access it.
5-7. Date, Time, Date and Time
Dates and times come in a variety of formats into your mailbox. Sometimes the date format may be quite ambiguous to parse:
- 11/07/2022. In different countries this can be either the 11th of July or the 7th of November.
To disambiguate that situation, Parsio allows you to specify the input and output format for your Date, Time and DateTime field types. You can find these settings under your Mailbox > Settings page:
If you leave the input fields empty, Parsio will try to "guess" the correct date & time formats. In the case where Parsio can't parse a field, its value will be kept untouched.
M1..12 (Jan is 1)
MM01..12 (Jan is 1)
- Day of year
- Week of year
- 24h hour
- 12h hour
- Timezone offset
- Unix timestamp:
- Millisecond Unix timestamp:
Here are some examples:
dddd, MMMM Do YYYYFriday, May 16th 2014
dddd [the] Do [of] MMMMFriday the 16th of May
hh:mm a12:30 pm
The Number format removes any spaces and special characters from the parsed value. Additionally, you can convert comma-separated numbers to decimal-separated and vice versa. You can find these settings under your Mailbox > Settings page:
In the case where Parsio can't parse a numeric field, its value will be kept untouched.