Skip to content

Commit 0b48a39

Browse files
committed
new functions
1 parent 929bac1 commit 0b48a39

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

articles/data-factory/data-flow-expression-functions.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ Logical AND operator. Same as &&
5959
* ``and(true, false) -> false``
6060
* ``true && false -> false``
6161
___
62+
### <code>array</code>
63+
<code><b>array([<i>&lt;value1&gt;</i> : any], ...) => array</b></code><br/><br/>
64+
Creates an array of items. All items should be of the same type. If no items are specified, an empty string array is the default. Same as a [] creation operator
65+
* ``array('Seattle', 'Washington')``
66+
* ``['Seattle', 'Washington']``
67+
* ``['Seattle', 'Washington'][1]``
68+
* ``'Washington'``
69+
___
6270
### <code>asin</code>
6371
<code><b>asin(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
6472
Calculates an inverse sine value
@@ -84,6 +92,27 @@ Selects a column value by name in the stream. You can pass a optional stream nam
8492
* ``toString(byName('Bogus Column'))``
8593
* ``toString(byName('Bogus Column', 'DeriveStream'))``
8694
___
95+
### <code>byNames</code>
96+
<code><b>byNames(<i>&lt;column names&gt;</i> : array, [<i>&lt;stream name&gt;</i> : string]) => any</b></code><br/><br/>
97+
Select an array of columns by name in the stream. You can pass a optional stream name as the second argument. If there are multiple matches, the first match is returned. If there are no matches for a column, the entire output is a NULL value. The returned value requires a type conversion functions (toDate, toString, ...). Column names known at design time should be addressed just by their name. Computed inputs are not supported but you can use parameter substitutions.
98+
* ``toString(byNames(['parent', 'child']))``
99+
* ````
100+
* ``byNames(['parent']) ? string``
101+
* ````
102+
* ``toLong(byNames(['income']))``
103+
* ````
104+
* ``byNames(['income']) ? long``
105+
* ````
106+
* ``toBoolean(byNames(['foster']))``
107+
* ````
108+
* ``toLong(byNames($debtCols))``
109+
* ````
110+
* ``toString(byNames(['a Column']))``
111+
* ````
112+
* ``toString(byNames(['a Column'], 'DeriveStream'))``
113+
* ````
114+
* ``byNames(['orderItem']) ? (itemName as string, itemQty as integer)``
115+
___
87116
### <code>byPosition</code>
88117
<code><b>byPosition(<i>&lt;position&gt;</i> : integer) => any</b></code><br/><br/>
89118
Selects a column value by its relative position(1 based) in the stream. If the position is out of bounds it returns a NULL value. The returned value has to be type converted by one of the type conversion functions(TO_DATE, TO_STRING ...)Computed inputs are not supported but you can use parameter substitutions
@@ -129,6 +158,15 @@ ___
129158
Gets all output columns for a stream. You can pass a optional stream name as the second argument.
130159
* ``columnNames()``
131160
* ``columnNames('DeriveStream')``
161+
162+
___
163+
### <code>columns</code>
164+
<code><b>columns([<i>&lt;stream name&gt;</i> : string]) => any</b></code><br/><br/>
165+
Gets all output columns for a stream. You can pass an optional stream name as the second argument.
166+
* ``columns()``
167+
* ````
168+
* ``columns('DeriveStream')``
169+
* ````
132170
___
133171
### <code>compare</code>
134172
<code><b>compare(<i>&lt;value1&gt;</i> : any, <i>&lt;value2&gt;</i> : any) => integer</b></code><br/><br/>

0 commit comments

Comments
 (0)