Head / String Layer
Extract the first N
characters from each string. Similar to Python's str[:n] slicing. Useful for:
- Creating preview text for long content
- Extracting fixed-width prefixes
- Truncating strings to specific length
- Working with fixed-format data fields
Table
0
0
Table
Select
columnThe string column to extract characters from. Works with any text content.
N
i32Number of characters (N
) to keep. Examples:
- Positive (3): takes first 3 characters (abc -> abc)
- Negative (-2): takes all except last 2 characters (abcd -> ab)
Returns fewer characters if string is shorter than |N|
AsColumn
nameName 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.