NthWord / String Layer

Extract the nth word (0-based index) from strings using whitespace as delimiter. Similar to Python's str.split()[n] or R's word(x, n). Returns null if the specified position doesn't exist or for empty/whitespace-only strings.

Common applications:

  • Extracting middle names
  • Getting specific elements from structured text
  • Processing fixed-format data
  • Analyzing word positions
  • Extracting specific components from identifiers
  • Finding particular elements in sequences
Table
0
0
Table

Select

column

The string column to extract from. Examples of extraction with n=1:

  • 'John Doe Smith' → 'Doe'
  • 'First Second Third' → 'Second'
  • 'Only' → null (no second word)

N

u32
0

Zero-based position of the word to extract. Examples:

  • 0: first word
  • 1: second word
  • 2: third word

Returns null if position exceeds available words

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.