Glossary
Definitions for key terms used across the Nomad Media platform and API.
Glossary
Rule Syntax for Config Files
The various Nomad Media config files use a SQL-based rule parser for enabling and disabling processors, profiles, and other configuration aspects.
General Syntax
Rules are valid SQL statements written against asset properties. For example:
ImageHeight >= 500
Compound statements using AND, OR, and NOT:
ImageHeight >= 500 AND ContentLength = 66992
Use parentheses to force precedence:
ImageHeight >= 1200 AND (ContentType LIKE '%jpeg' OR ContentType LIKE '%jpg')
Available Asset Properties
Rules can reference any of the following properties (plus custom metadata properties):
| Property | Example Value |
|---|---|
bucketType | 3 |
assetType | 2 |
assetTypeDisplay | "File" |
storageEventName | "ObjectCreated:Put" |
originalObjectKey | "Content/Public/Media/image.jpg" |
contentLength | 66992 |
contentType | "image/jpeg" |
mediaType | 1 |
mediaTypeDisplay | "Image" |
imageHeight | 500 |
imageWidth | 800 |
audioTrackCount | 0 |
hasAudio | false |
storageClass | 1 |
createdDate | "2022-08-26T08:41:51.541Z" |
C# Example
string rule = "url LIKE '%content/wsls/2022/09/06/noon 1 hour 9.6.22/%'";
CaseInsensitiveDictionary<object> properties = new CaseInsensitiveDictionary<object>();
properties.SetValue("url", "nomad-dev-04-system-content-rc46y2f3ixyo::Content/WSLS/2022/09/06/Noon 1 HOUR 9.6.22/AM NATIONAL SUICIDE PRE_WSLS5QWD.mxf");
bool ruleValue = SqlRuleParserRepository.Value.ProcessRule(rule, properties, null);
Assert.True(ruleValue);SQL Syntax Reference
Comparison Operators
| Operator | Description |
|---|---|
< | Less than |
> | Greater than |
<= | Less than or equal |
>= | Greater than or equal |
<> | Not equal |
= | Equal |
IN | Value in list |
LIKE | Pattern match |
Arithmetic Operators
| Operator | Description |
|---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus |
Boolean Operators
AND, OR, NOT. AND has precedence over OR. Use parentheses to override:
(LastName = 'Smith' OR LastName = 'Jones') AND FirstName = 'John'
Wildcard Characters
Both * and % can be used interchangeably as wildcards in a LIKE comparison. Wildcards are allowed at the start, end, or both ends of a pattern — but not in the middle:
"ItemName LIKE '*product*'"
"ItemName LIKE '*product'"
"ItemName LIKE 'product*'"
Note: 'te*xt' is not allowed (wildcard in the middle).
Aggregate Functions
| Function | Description |
|---|---|
Sum(expr) | Sum |
Avg(expr) | Average |
Min(expr) | Minimum |
Max(expr) | Maximum |
Count(expr) | Count |
StDev(expr) | Statistical standard deviation |
Var(expr) | Statistical variance |
Example:
Sum(Price)
Avg(Child.Price)
Built-in Functions
| Function | Syntax | Description |
|---|---|---|
CONVERT | Convert(expression, type) | Converts to a .NET type (e.g. Convert(total, 'System.Int32')) |
LEN | LEN(expression) | Returns the length of a string |
ISNULL | ISNULL(expression, replacementvalue) | Returns replacement if expression is null |
IIF | IIF(expr, truepart, falsepart) | Conditional — returns truepart or falsepart |
TRIM | TRIM(expression) | Removes leading/trailing whitespace (\r, \n, \t, space) |
SUBSTRING | SUBSTRING(expression, start, length) | Returns a substring |
Examples:
Convert(total, 'System.Int32')
Len(ItemName)
IsNull(price, -1)
IIF(total>1000, 'expensive', 'cheap')
SUBSTRING(phone, 7, 8)