View on GitHub

JODA - JSON On Demand Analysis

Efficient data wrangling for semi-structured JSON documents

STARTSWITH - String

Checks whether str starts with substr

Input parameters

Name Type Optional Description
str String False  
substr String False  

Output

Bool: True if str starts with substr

Usage

STARTSWITH(<str>, <substr>)

Examples

Example 1

Query

LOAD tmp
AS ('': STARTSWITH("dogsitter", "dog"))

Result

true

Example 2

Query

LOAD tmp
AS ('': STARTSWITH("dogsitter", "sitter"))

Result

false