diff --git a/learnEcl/1500-if.md b/learnEcl/1500-if.md index 4d98aa4..8443a9e 100644 --- a/learnEcl/1500-if.md +++ b/learnEcl/1500-if.md @@ -2,3 +2,70 @@ title: If slug: if --- + +# IF Statement + +The IF function allows you to make a logical comparison between value(s) and what returning a result if that condition is True or False. + +## Syntax + +
+
+
+
+ +| Value | Definition | +| :----------- | :----------------------------------------------- | +| attribName | The name by which the variable will be invoked. | +| IF | Required | +| expression | Boolean expression to be check for True or False | +| true_result | Result value or action if expression is True | +| false_result | May be omitted only if true_result is an action | + +**Example** + +
+
+
+
+ +## Logical Operators + +Logical values that can be used for comparison of two values. + +| Operator | Description | +| :-------- | :----------------------------------------------------------------- | +| `=` | Equal | +| ` >` | Greater than | +| `<` | Less than | +| `>=` | Greater than or equal | +| `<=` | Less than or equal | +| `<>` | Not equal | +| `!= ` | Not equal | +| `~` | Not | +| `AND` | Logical AND | +| `OR` | Logical OR | +| `IN` | To specify multiple possible values for a field/column | +| `NOT IN` | To specify multiple possible values that are not in a field/column | +| `BETWEEN` | Between a certain range | diff --git a/learnEcl/1600-choose.md b/learnEcl/1600-choose.md index c1d1fdf..041c344 100644 --- a/learnEcl/1600-choose.md +++ b/learnEcl/1600-choose.md @@ -2,3 +2,59 @@ title: Choose slug: choose --- + +# CHOOSE + +CHOOSE function eEvaluates the expression and returns the value parameter whose ordinal position in the list of parameters corresponds to the result of the expression. All values for this function must have the same type. If no match is found it will return the else-value. + +**Example** + +
+
+
+
+ +## Syntax + +
+
+
+
+ +| _Value_ | _Definition_ | +| :-------------- | :---------------------------------------------- | +| Expression | Evaluation field | +| Value1 … ValueN | If expression matches it will return the result | +| Else | If nothing matches else-value is returned | + +**Example** + +
+
+
+
diff --git a/learnEcl/1700-map.md b/learnEcl/1700-map.md index 1e6f971..a79a710 100644 --- a/learnEcl/1700-map.md +++ b/learnEcl/1700-map.md @@ -2,3 +2,114 @@ title: Map slug: map --- + +# MAP Function + +MAP function evaluates the list of Boolean expressions and returns the value associated with the first true expression. + +MAP Characteristics + +- If no match is found than the else-value is returned +- All return values and else_value values must be of the same type +- All expressions must reference the same level of dataset scoping. Therefore, all expressions must either reference fields in the same dataset or the existence of a set of related child records +- The expressions are evaluated in the order in which they appear. + +## Syntax + +
+
+
+
+ +| _Value_ | _Definition_ | +| :------------ | :------------------------------------------------------------------------------------------------------------------------------ | +| attr_name | The name by which the function will be invoked | +| MAP | ECL Keyword, required | +| Expression1…N | Boolean expression | +| `=> ` | “Result in” operator | +| Else_value | Optional if all other possible return values are actions, otherwise required. The value to return if all expressions are false. | + +**Example** + +
+
+
+
+ +## Logical Operators + +Logical values that can be used for comparison of two values. + +**Demo Dataset** + +| PersonID | FirstName | LastName | isEmployed | avgHouseIncome | +| :------- | :-------- | :------- | :--------- | :------------- | +| 102 | Fred | Smith | FALSE | 0 | +| 012 | Joe | Blow | TRUE | 11250 | +| 085 | Blue | Moon | TRUE | 185000 | +| 055 | Silver | Jo | FALSE | 5000 | +| 265 | Darling | Jo | TRUE | 5000 | +| 333 | Jane | Smith | FALSE | 50000 | + +
+
+
+
+ +## Logical Operators + +Logical values that can be used for comparison of two values. + +| Operator | Description | +| :-------- | :----------------------------------------------------------------- | +| `=` | Equal | +| `>` | Greater than | +| `<` | Less than | +| `>=` | Greater than or equal | +| `<=` | Less than or equal | +| `<>` | Not equal | +| `!=` | Not equal | +| `~` | Not | +| `AND` | Logical AND | +| `OR` | Logical OR | +| `IN` | To specify multiple possible values for a field/column | +| `NOT IN` | To specify multiple possible values that are not in a field/column | +| `BETWEEN` | Between a certain range | diff --git a/learnEcl/1800-dedup.md b/learnEcl/1800-dedup.md index 692120f..c0cc6f4 100644 --- a/learnEcl/1800-dedup.md +++ b/learnEcl/1800-dedup.md @@ -2,3 +2,82 @@ title: Dedup slug: dedup --- + +# DEDUP + +The DEDUP function removes duplicates from a dataset based on the defined conditions. The result is dataset with unique values for selected fields. + +**Note** To use DEDUP you dataset must be **sorted**. + +## Syntax + +
+
+
+
+ +| Value | Definition | +| :-------- | :--------------------------------------------------------------------------------------------------- | +| DEDUP | Required. | +| dataset | Input dataset to process. | +| condition | A comma-delimited list of expressions or key fields in the dataset that defines "duplicate" records. | + +**Demo Dataset** + +| StudentID | Name | City | State | ZipCodeDepartment | | +| :-------- | :---- | :------ | :---- | :---------------- | ------- | +| 300 | Sarah | Dallas | Te | 30000 | Art | +| 400 | Matt | | | Medical | +| 305 | Liz | Atlanta | GA | 30330 | Math | +| 305 | Liz | smyrna | GA | 30330 | +| 100 | Zoro | Atlanta | GA | 30330 | +| 100 | Zoro | smyrna | GA | 30330 | +| 800 | Sandy | | | | Science | +| 604 | Danny | Newyork | NY | 40001 | +| 409 | Dan | Newyork | NY | 40001 | Medical | +| 300 | Sarah | Dallas | TX | 30000 | Math | + +**Example** + +
+
+
+
diff --git a/learnEcl/1900-exists.md b/learnEcl/1900-exists.md index bf9abed..88eb0f7 100644 --- a/learnEcl/1900-exists.md +++ b/learnEcl/1900-exists.md @@ -2,3 +2,91 @@ title: Exists slug: exists --- + +# EXISTS + +EXISTS functions checks to see if there are any rows int the dataset. EXISTS returns TRUE if there is at least 1 record in the dataset. + +EXISTS is more efficient than COUNT, since COUNT will count all the rows in dataset, versus EXITS just checks to see row 1 exists. + +## Syntax + +
+
+
+
+
+ +| Value | Definition | +| :-------- | :--------------------------- | +| EXISTS | Required. | +| recordset | Dataset to be checked. | +| value_set | Values in a SET to be check. | + +**Demo Dataset** + +| City | State | County | Population | +| :------------- | :---- | :-------- | :--------- | +| Dauphin Island | AL | Mobile | 1335 | +| Guy | AR | Faulkner | 778 | +| El Centro | CA | Imperial | 111425 | +| Indio | CA | Riverside | 417059 | +| Englewood | CO | Arapahoe | 6183 | +| Keywest | FL | Monroe | 31401 | +| Manatee Road | FL | Levy | 2670 | +| Villa Rica | GA | Carroll | 16058 | +| Atlanta | GA | Fulton | 5449398 | + +**Example** + +
+
+
+
+ +**Example** + +
+
+
+
diff --git a/learnEcl/2000-choosen.md b/learnEcl/2000-choosen.md index b38492e..464cf69 100644 --- a/learnEcl/2000-choosen.md +++ b/learnEcl/2000-choosen.md @@ -2,3 +2,75 @@ title: Choosen slug: choosen --- + +# CHOOSEN + +CHOOSEN function allows you to display certain number of rows from a dataset. It can start either from row one, or the row you defined. + +## Syntax + +
+
+
+
+ +| Value | Definition | +| :------------- | :--------------------------------------------------------------- | +| attr_name | The name by which the function will be invoked. | +| CHOOSEN | Required. | +| n | number of records to return. | +| start_position | Optional, to indicate which row to start with. Default is row 1. | + +**Demo Dataset** + +| City | State | County | Population | +| :------------- | :---- | :-------- | :--------- | +| Dauphin Island | AL | Mobile | 1335 | +| Guy | AR | Faulkner | 778 | +| El Centro | CA | Imperial | 111425 | +| Indio | CA | Riverside | 417059 | +| Englewood | CO | Arapahoe | 6183 | +| Keywest | FL | Monroe | 31401 | +| Manatee Road | FL | Levy | 2670 | +| Villa Rica | GA | Carroll | 16058 | +| Atlanta | GA | Fulton | 5449398 | + +**Example** + +
+
+
+
diff --git a/learnEcl/2100-topn.md b/learnEcl/2100-topn.md index 41b9363..57f3942 100644 --- a/learnEcl/2100-topn.md +++ b/learnEcl/2100-topn.md @@ -2,3 +2,60 @@ title: Topn slug: topn --- + +# TOPN + +In a sorted dataset, TOPN returns the n number of records from the row 1 of the dataset. + +**Example** + +
+
+
+
+ +## Syntax + +
+
+
+
+ +| _Value_ | _Definition_ | +| :--------- | :-------------------------------------- | +| Dataset | Input dataset | +| Count | Number of records to displat | +| SortValues | Fields that sorting will be executed on | +| flags | Optional | + +## Flags + +| Options | Description | +| --------- | -------------------------------------------------------------------- | +| UNORDERED | Output record order is not significant | +| ORDERED | Significance of the output record order | +| STABLE | Input record order is significant | +| PARALLEL | Evaluate this activity in parallel | +| LOCAL | Operation is performed independently on each node | +| GROUP | Recordset is GROUPed, ROLLUP yields a single output record per group |