Conditional functions
Cloudflare Pipelines scalar function implementations are based on Apache DataFusion ↗ (via Arroyo ↗) and these docs are derived from the DataFusion function reference.
Returns the first of its arguments that is not null. Returns null if all arguments are null. This function is often used to substitute a default value for null values.
coalesce(expression1[, ..., expression_n])
Arguments
- expression1, expression_n: Expression to use if previous expressions are null. Can be a constant, column, or function, and any combination of arithmetic operators. Pass as many expression arguments as necessary.
Returns null if expression1 equals expression2; otherwise it returns expression1.
This can be used to perform the inverse operation of coalesce
.
nullif(expression1, expression2)
Arguments
- expression1: Expression to compare and return if equal to expression2. Can be a constant, column, or function, and any combination of arithmetic operators.
- expression2: Expression to compare to expression1. Can be a constant, column, or function, and any combination of arithmetic operators.
Returns expression2 if expression1 is NULL; otherwise it returns expression1.
nvl(expression1, expression2)
Arguments
- expression1: return if expression1 not is NULL. Can be a constant, column, or function, and any combination of arithmetic operators.
- expression2: return if expression1 is NULL. Can be a constant, column, or function, and any combination of arithmetic operators.
Returns expression2 if expression1 is not NULL; otherwise it returns expression3.
nvl2(expression1, expression2, expression3)
Arguments
- expression1: conditional expression. Can be a constant, column, or function, and any combination of arithmetic operators.
- expression2: return if expression1 is not NULL. Can be a constant, column, or function, and any combination of arithmetic operators.
- expression3: return if expression1 is NULL. Can be a constant, column, or function, and any combination of arithmetic operators.
Alias of nvl.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-