SliceMixed / String Layer

Extract substrings using either fixed or dynamic position and length values. Similar to Python's str[start:start+length], but with support for column-based slicing parameters. Works with UTF-8 characters, not bytes.

Common applications:

  • Extracting dynamic-length fields
  • Processing variable-format data
  • Working with position-based formats
  • Splitting strings based on data-driven rules
  • Creating flexible text extracts
  • Handling custom data formats

Examples:

  • Fixed slice: 'Hello World'[0:5] → 'Hello'
  • Dynamic offset: offset from length column
  • Dynamic length: length based on content
  • Mixed: fixed offset with dynamic length

Note: Handles UTF-8 characters correctly, including multi-byte characters and special symbols.

Table
0
0
Table

Select

column

The string column to slice. Examples of input:

  • Fixed-width fields: 'CODE12345DESC '
  • Variable text: 'Header: Content here'
  • Mixed content: '2024-01-31 Log entry'
  • Structured data: 'Name=John;Age=30'

Offset

oneof
SelectOffset

Column containing starting positions for slicing. Enables dynamic offset values based on data. Use cases:

  • Variable header lengths
  • Data-dependent start positions
  • Calculated offsets
  • Pattern-based positioning

Column must contain valid integer values

Fixed starting position for slicing. Examples:

  • 0: Start from beginning
  • 5: Skip first 5 characters
  • -10: Start 10 characters from end

Negative values count from string end

Length

oneof
SelectLength

Column containing length values for slicing. Enables variable-length extraction. Use cases:

  • Content-dependent lengths
  • Dynamic field sizes
  • Adaptive text extraction
  • Data-driven substring lengths

Column must contain valid integer values

Fixed length for substring extraction. Examples:

  • 3: Take 3 characters
  • 10: Extract 10 characters
  • -2: Take all but last 2 characters

Negative values retain characters from start up to that position from end

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.