| {{ $ref := ref . "maintenance/configurations.md" }} |
| <table class="configuration table table-bordered"> |
| <thead> |
| <tr> |
| <th class="text-left" style="width: 15%">Function</th> |
| <th class="text-left" style="width: 85%">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><h5>substring(column,beginInclusive)</h5></td> |
| <td>Get column.substring(beginInclusive). Output is a STRING.</td> |
| </tr> |
| <tr> |
| <td><h5>substring(column,beginInclusive,endExclusive)</h5></td> |
| <td>Get column.substring(beginInclusive,endExclusive). Output is a STRING.</td> |
| </tr> |
| <tr> |
| <td><h5>truncate(column,width)</h5></td> |
| <td>Truncate column by width. Output type is the same with column. If the column is a STRING, truncate(column,width) will truncate the string to width characters, namely `value.substring(0, width)`. |
| If the column is an INT or LONG, truncate(column,width) will truncate the number with the algorithm `v - (((v % W) + W) % W)`. The `redundant` compute part is to keep the result always positive. |
| If the column is a DECIMAL, truncate(column,width) will truncate the decimal with the algorithm: let `scaled_W = decimal(W, scale(v))`, then return `v - (v % scaled_W)`.</td> |
| </tr> |
| <tr> |
| <td><h5>cast(value,dataType)</h5></td> |
| <td>Get a constant value. The output is an atomic type, such as STRING, INT, BOOLEAN, etc.</td> |
| </tr> |
| <tr> |
| <td><h5>upper(value)</h5></td> |
| <td>Convert string column to upper case. The input should be a STRING and the output is a STRING.</td> |
| </tr> |
| <tr> |
| <td><h5>lower(value)</h5></td> |
| <td>Convert string column to lower case. The input should be a STRING and the output is a STRING.</td> |
| </tr> |
| <tr> |
| <td><h5>trim(value)</h5></td> |
| <td>Trim string column. The input should be a STRING and the output is a STRING.</td> |
| </tr> |
| </tbody> |
| </table> |