Apache Pinot Docs
Search…
latest
Configuration Reference
substr
This section contains reference documentation for the substr function.
Get substring of the input string from start to endIndex. Index begins at 0. Set endIndex to -1 to calculate till end of the string

Signature

SUBSTR(col, startIndex, endIndex)

Usage Examples

1
select SUBSTR('Pinot', 1, -1) AS name
2
FROM ignoreMe
Copied!
name
inot
1
select SUBSTR('Pinot', 0, 2) AS name
2
FROM ignoreMe
Copied!
name
Pi
Last modified 6mo ago
Copy link