Skip to content

Commit f3f0338

Browse files
authored
Merge pull request #113201 from v-maudel/patch-492
C189395 Adding Hard Breaks before code
2 parents df1d88e + 990e0df commit f3f0338

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ Extracts a subset of an array from a position. Position is 1 based. If the lengt
730730
___
731731
### <code>sort</code>
732732
<code><b>sort(<i>&lt;value1&gt;</i> : array, <i>&lt;value2&gt;</i> : binaryfunction) => array</b></code><br/><br/>
733-
Sorts the array using the provided predicate function. Sort expects a reference to two consecutive elements in the expression function as #item1 and #item2
733+
Sorts the array using the provided predicate function. Sort expects a reference to two consecutive elements in the expression function as #item1 and #item2
734734
* ``sort([4, 8, 2, 3], compare(#item1, #item2)) -> [2, 3, 4, 8]``
735735
* ``sort(['a3', 'b2', 'c1'], iif(right(#item1, 1) >= right(#item2, 1), 1, -1)) -> ['c1', 'b2', 'a3']``
736736
___
@@ -951,213 +951,213 @@ Based on a criteria gets the average of values of a column
951951
___
952952
### <code>count</code>
953953
<code><b>count([<i>&lt;value1&gt;</i> : any]) => long</b></code><br/><br/>
954-
Gets the aggregate count of values. If the optional column(s) is specified, it ignores NULL values in the count
954+
Gets the aggregate count of values. If the optional column(s) is specified, it ignores NULL values in the count
955955
* ``count(custId)``
956956
* ``count(custId, custName)``
957957
* ``count()``
958958
* ``count(iif(isNull(custId), 1, NULL))``
959959
___
960960
### <code>countDistinct</code>
961961
<code><b>countDistinct(<i>&lt;value1&gt;</i> : any, [<i>&lt;value2&gt;</i> : any], ...) => long</b></code><br/><br/>
962-
Gets the aggregate count of distinct values of a set of columns
962+
Gets the aggregate count of distinct values of a set of columns
963963
* ``countDistinct(custId, custName)``
964964
___
965965
### <code>countIf</code>
966966
<code><b>countIf(<i>&lt;value1&gt;</i> : boolean, [<i>&lt;value2&gt;</i> : any]) => long</b></code><br/><br/>
967-
Based on a criteria gets the aggregate count of values. If the optional column is specified, it ignores NULL values in the count
967+
Based on a criteria gets the aggregate count of values. If the optional column is specified, it ignores NULL values in the count
968968
* ``countIf(state == 'CA' && commission < 10000, name)``
969969
___
970970
### <code>covariancePopulation</code>
971971
<code><b>covariancePopulation(<i>&lt;value1&gt;</i> : number, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
972-
Gets the population covariance between two columns
972+
Gets the population covariance between two columns
973973
* ``covariancePopulation(sales, profit)``
974974
___
975975
### <code>covariancePopulationIf</code>
976976
<code><b>covariancePopulationIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number, <i>&lt;value3&gt;</i> : number) => double</b></code><br/><br/>
977-
Based on a criteria, gets the population covariance of two columns
977+
Based on a criteria, gets the population covariance of two columns
978978
* ``covariancePopulationIf(region == 'West', sales)``
979979
___
980980
### <code>covarianceSample</code>
981981
<code><b>covarianceSample(<i>&lt;value1&gt;</i> : number, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
982-
Gets the sample covariance of two columns
982+
Gets the sample covariance of two columns
983983
* ``covarianceSample(sales, profit)``
984984
___
985985
### <code>covarianceSampleIf</code>
986986
<code><b>covarianceSampleIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number, <i>&lt;value3&gt;</i> : number) => double</b></code><br/><br/>
987-
Based on a criteria, gets the sample covariance of two columns
987+
Based on a criteria, gets the sample covariance of two columns
988988
* ``covarianceSampleIf(region == 'West', sales, profit)``
989989
___
990990
### <code>first</code>
991991
<code><b>first(<i>&lt;value1&gt;</i> : any, [<i>&lt;value2&gt;</i> : boolean]) => any</b></code><br/><br/>
992-
Gets the first value of a column group. If the second parameter ignoreNulls is omitted, it is assumed false
992+
Gets the first value of a column group. If the second parameter ignoreNulls is omitted, it is assumed false
993993
* ``first(sales)``
994994
* ``first(sales, false)``
995995
___
996996
### <code>kurtosis</code>
997997
<code><b>kurtosis(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
998-
Gets the kurtosis of a column
998+
Gets the kurtosis of a column
999999
* ``kurtosis(sales)``
10001000
___
10011001
### <code>kurtosisIf</code>
10021002
<code><b>kurtosisIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1003-
Based on a criteria, gets the kurtosis of a column
1003+
Based on a criteria, gets the kurtosis of a column
10041004
* ``kurtosisIf(region == 'West', sales)``
10051005
___
10061006
### <code>last</code>
10071007
<code><b>last(<i>&lt;value1&gt;</i> : any, [<i>&lt;value2&gt;</i> : boolean]) => any</b></code><br/><br/>
1008-
Gets the last value of a column group. If the second parameter ignoreNulls is omitted, it is assumed false
1008+
Gets the last value of a column group. If the second parameter ignoreNulls is omitted, it is assumed false
10091009
* ``last(sales)``
10101010
* ``last(sales, false)``
10111011
___
10121012
### <code>max</code>
10131013
<code><b>max(<i>&lt;value1&gt;</i> : any) => any</b></code><br/><br/>
1014-
Gets the maximum value of a column
1014+
Gets the maximum value of a column
10151015
* ``max(sales)``
10161016
___
10171017
### <code>maxIf</code>
10181018
<code><b>maxIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : any) => any</b></code><br/><br/>
1019-
Based on a criteria, gets the maximum value of a column
1019+
Based on a criteria, gets the maximum value of a column
10201020
* ``maxIf(region == 'West', sales)``
10211021
___
10221022
### <code>mean</code>
10231023
<code><b>mean(<i>&lt;value1&gt;</i> : number) => number</b></code><br/><br/>
1024-
Gets the mean of values of a column. Same as AVG
1024+
Gets the mean of values of a column. Same as AVG
10251025
* ``mean(sales)``
10261026
___
10271027
### <code>meanIf</code>
10281028
<code><b>meanIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => number</b></code><br/><br/>
1029-
Based on a criteria gets the mean of values of a column. Same as avgIf
1029+
Based on a criteria gets the mean of values of a column. Same as avgIf
10301030
* ``meanIf(region == 'West', sales)``
10311031
___
10321032
### <code>min</code>
10331033
<code><b>min(<i>&lt;value1&gt;</i> : any) => any</b></code><br/><br/>
1034-
Gets the minimum value of a column
1034+
Gets the minimum value of a column
10351035
* ``min(sales)``
10361036
___
10371037
### <code>minIf</code>
10381038
<code><b>minIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : any) => any</b></code><br/><br/>
1039-
Based on a criteria, gets the minimum value of a column
1039+
Based on a criteria, gets the minimum value of a column
10401040
* ``minIf(region == 'West', sales)``
10411041
___
10421042
### <code>skewness</code>
10431043
<code><b>skewness(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1044-
Gets the skewness of a column
1044+
Gets the skewness of a column
10451045
* ``skewness(sales)``
10461046
___
10471047
### <code>skewnessIf</code>
10481048
<code><b>skewnessIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1049-
Based on a criteria, gets the skewness of a column
1049+
Based on a criteria, gets the skewness of a column
10501050
* ``skewnessIf(region == 'West', sales)``
10511051
___
10521052
### <code>stddev</code>
10531053
<code><b>stddev(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1054-
Gets the standard deviation of a column
1054+
Gets the standard deviation of a column
10551055
* ``stdDev(sales)``
10561056
___
10571057
### <code>stddevIf</code>
10581058
<code><b>stddevIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1059-
Based on a criteria, gets the standard deviation of a column
1059+
Based on a criteria, gets the standard deviation of a column
10601060
* ``stddevIf(region == 'West', sales)``
10611061
___
10621062
### <code>stddevPopulation</code>
10631063
<code><b>stddevPopulation(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1064-
Gets the population standard deviation of a column
1064+
Gets the population standard deviation of a column
10651065
* ``stddevPopulation(sales)``
10661066
___
10671067
### <code>stddevPopulationIf</code>
10681068
<code><b>stddevPopulationIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1069-
Based on a criteria, gets the population standard deviation of a column
1069+
Based on a criteria, gets the population standard deviation of a column
10701070
* ``stddevPopulationIf(region == 'West', sales)``
10711071
___
10721072
### <code>stddevSample</code>
10731073
<code><b>stddevSample(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1074-
Gets the sample standard deviation of a column
1074+
Gets the sample standard deviation of a column
10751075
* ``stddevSample(sales)``
10761076
___
10771077
### <code>stddevSampleIf</code>
10781078
<code><b>stddevSampleIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1079-
Based on a criteria, gets the sample standard deviation of a column
1079+
Based on a criteria, gets the sample standard deviation of a column
10801080
* ``stddevSampleIf(region == 'West', sales)``
10811081
___
10821082
### <code>sum</code>
10831083
<code><b>sum(<i>&lt;value1&gt;</i> : number) => number</b></code><br/><br/>
1084-
Gets the aggregate sum of a numeric column
1084+
Gets the aggregate sum of a numeric column
10851085
* ``sum(col)``
10861086
___
10871087
### <code>sumDistinct</code>
10881088
<code><b>sumDistinct(<i>&lt;value1&gt;</i> : number) => number</b></code><br/><br/>
1089-
Gets the aggregate sum of distinct values of a numeric column
1089+
Gets the aggregate sum of distinct values of a numeric column
10901090
* ``sumDistinct(col)``
10911091
___
10921092
### <code>sumDistinctIf</code>
10931093
<code><b>sumDistinctIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => number</b></code><br/><br/>
1094-
Based on criteria gets the aggregate sum of a numeric column. The condition can be based on any column
1094+
Based on criteria gets the aggregate sum of a numeric column. The condition can be based on any column
10951095
* ``sumDistinctIf(state == 'CA' && commission < 10000, sales)``
10961096
* ``sumDistinctIf(true, sales)``
10971097
___
10981098
### <code>sumIf</code>
10991099
<code><b>sumIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => number</b></code><br/><br/>
1100-
Based on criteria gets the aggregate sum of a numeric column. The condition can be based on any column
1100+
Based on criteria gets the aggregate sum of a numeric column. The condition can be based on any column
11011101
* ``sumIf(state == 'CA' && commission < 10000, sales)``
11021102
* ``sumIf(true, sales)``
11031103
___
11041104
### <code>variance</code>
11051105
<code><b>variance(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1106-
Gets the variance of a column
1106+
Gets the variance of a column
11071107
* ``variance(sales)``
11081108
___
11091109
### <code>varianceIf</code>
11101110
<code><b>varianceIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1111-
Based on a criteria, gets the variance of a column
1111+
Based on a criteria, gets the variance of a column
11121112
* ``varianceIf(region == 'West', sales)``
11131113
___
11141114
### <code>variancePopulation</code>
11151115
<code><b>variancePopulation(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1116-
Gets the population variance of a column
1116+
Gets the population variance of a column
11171117
* ``variancePopulation(sales)``
11181118
___
11191119
### <code>variancePopulationIf</code>
11201120
<code><b>variancePopulationIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1121-
Based on a criteria, gets the population variance of a column
1121+
Based on a criteria, gets the population variance of a column
11221122
* ``variancePopulationIf(region == 'West', sales)``
11231123
___
11241124
### <code>varianceSample</code>
11251125
<code><b>varianceSample(<i>&lt;value1&gt;</i> : number) => double</b></code><br/><br/>
1126-
Gets the unbiased variance of a column
1126+
Gets the unbiased variance of a column
11271127
* ``varianceSample(sales)``
11281128
___
11291129
### <code>varianceSampleIf</code>
11301130
<code><b>varianceSampleIf(<i>&lt;value1&gt;</i> : boolean, <i>&lt;value2&gt;</i> : number) => double</b></code><br/><br/>
1131-
Based on a criteria, gets the unbiased variance of a column
1131+
Based on a criteria, gets the unbiased variance of a column
11321132
* ``varianceSampleIf(region == 'West', sales)``
11331133
## Window functions
11341134
The following functions are only available in window transformations
11351135
___
11361136
### <code>cumeDist</code>
11371137
<code><b>cumeDist() => integer</b></code><br/><br/>
1138-
The CumeDist function computes the position of a value relative to all values in the partition. The result is the number of rows preceding or equal to the current row in the ordering of the partition divided by the total number of rows in the window partition. Any tie values in the ordering will evaluate to the same position.
1138+
The CumeDist function computes the position of a value relative to all values in the partition. The result is the number of rows preceding or equal to the current row in the ordering of the partition divided by the total number of rows in the window partition. Any tie values in the ordering will evaluate to the same position.
11391139
* ``cumeDist()``
11401140
___
11411141
### <code>denseRank</code>
11421142
<code><b>denseRank() => integer</b></code><br/><br/>
1143-
Computes the rank of a value in a group of values specified in a window's order by clause. The result is one plus the number of rows preceding or equal to the current row in the ordering of the partition. The values will not produce gaps in the sequence. Dense Rank works even when data is not sorted and looks for change in values
1143+
Computes the rank of a value in a group of values specified in a window's order by clause. The result is one plus the number of rows preceding or equal to the current row in the ordering of the partition. The values will not produce gaps in the sequence. Dense Rank works even when data is not sorted and looks for change in values
11441144
* ``denseRank()``
11451145
___
11461146
### <code>lag</code>
11471147
<code><b>lag(<i>&lt;value&gt;</i> : any, [<i>&lt;number of rows to look before&gt;</i> : number], [<i>&lt;default value&gt;</i> : any]) => any</b></code><br/><br/>
1148-
Gets the value of the first parameter evaluated n rows before the current row. The second parameter is the number of rows to look back and the default value is 1. If there are not as many rows a value of null is returned unless a default value is specified
1148+
Gets the value of the first parameter evaluated n rows before the current row. The second parameter is the number of rows to look back and the default value is 1. If there are not as many rows a value of null is returned unless a default value is specified
11491149
* ``lag(amount, 2)``
11501150
* ``lag(amount, 2000, 100)``
11511151
___
11521152
### <code>lead</code>
11531153
<code><b>lead(<i>&lt;value&gt;</i> : any, [<i>&lt;number of rows to look after&gt;</i> : number], [<i>&lt;default value&gt;</i> : any]) => any</b></code><br/><br/>
1154-
Gets the value of the first parameter evaluated n rows after the current row. The second parameter is the number of rows to look forward and the default value is 1. If there are not as many rows a value of null is returned unless a default value is specified
1154+
Gets the value of the first parameter evaluated n rows after the current row. The second parameter is the number of rows to look forward and the default value is 1. If there are not as many rows a value of null is returned unless a default value is specified
11551155
* ``lead(amount, 2)``
11561156
* ``lead(amount, 2000, 100)``
11571157
___
11581158
### <code>nTile</code>
11591159
<code><b>nTile([<i>&lt;value1&gt;</i> : integer]) => integer</b></code><br/><br/>
1160-
The NTile function divides the rows for each window partition into `n` buckets ranging from 1 to at most `n`. Bucket values will differ by at most 1. If the number of rows in the partition does not divide evenly into the number of buckets, then the remainder values are distributed one per bucket, starting with the first bucket. The NTile function is useful for the calculation of tertiles, quartiles, deciles, and other common summary statistics. The function calculates two variables during initialization: The size of a regular bucket will have one extra row added to it. Both variables are based on the size of the current partition. During the calculation process the function keeps track of the current row number, the current bucket number, and the row number at which the bucket will change (bucketThreshold). When the current row number reaches bucket threshold, the bucket value is increased by one and the threshold is increased by the bucket size (plus one extra if the current bucket is padded).
1160+
The NTile function divides the rows for each window partition into `n` buckets ranging from 1 to at most `n`. Bucket values will differ by at most 1. If the number of rows in the partition does not divide evenly into the number of buckets, then the remainder values are distributed one per bucket, starting with the first bucket. The NTile function is useful for the calculation of tertiles, quartiles, deciles, and other common summary statistics. The function calculates two variables during initialization: The size of a regular bucket will have one extra row added to it. Both variables are based on the size of the current partition. During the calculation process the function keeps track of the current row number, the current bucket number, and the row number at which the bucket will change (bucketThreshold). When the current row number reaches bucket threshold, the bucket value is increased by one and the threshold is increased by the bucket size (plus one extra if the current bucket is padded).
11611161
* ``nTile()``
11621162
* ``nTile(numOfBuckets)``
11631163
___

0 commit comments

Comments
 (0)