Skip to main content

PARSE

Extract structured data from string fields using anchor parsing.

Syntax

PARSE [expression] pattern AS? identifier (, identifier)* [NODROP]

Parameters

  • expression - Optional source field to parse (defaults to current row context)
  • pattern - Anchor pattern string using star (*) characters to mark extraction points
  • identifier - Output field names for extracted values
  • NODROP - Optional flag to preserve the original source field

Description

The PARSE command provides a lightweight pattern matching approach that is a simple alternative to complex regular expressions. It extracts structured data from string fields using anchor parsing with star () characters. The pattern string uses literal text as anchors with star characters marking extraction points (e.g., "prefix--suffix" extracts the value between the anchors). You must provide as many output identifiers as there are star (*) characters in the pattern. The command creates new fields containing the extracted values. By default, rows that don't match the pattern are filtered out. When you specify NODROP, non-matching rows are preserved with all output fields set to null.