transformations:filter
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
transformations:filter [2015/06/12 21:20] – dmitry | transformations:filter [2024/03/07 10:22] (current) – [Remarks] dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Filter by Condition | + | {{ transformations: |
+ | ====== | ||
+ | Category: Transform / Filters\\ | ||
- | This transformation | + | \\ |
+ | =====Description===== | ||
+ | This action | ||
- | The expression must be a valid condition | + | If no rows satisfy the condition |
- | **Examples of conditions** | + | The expression must be a valid condition -- it must return either TRUE or FALSE for any row in the table. If it results in a non-boolean value (i.e. not TRUE or FALSE) for at least one row it will cause a project execution error.\\ |
- | [Amount]=0 | + | |
- | + | ||
- | [Length] * [Width] * [Height] <= 1000 | + | |
- | + | ||
- | contains([City], ' | + | |
- | + | ||
- | | + | |
- | | + | |
- | If no rows satisfy the condition then all rows are removed. | + | \\ |
+ | =====Use cases===== | ||
+ | Create subsets of a dataset based on values across multiple columns. | ||
- | **Example of transformation** | + | Clean a dataset by removing records that don't meet certain criteria, or evaluate to a certain value. \\ |
- | **Source table: | + | \\ |
+ | =====Action settings===== | ||
+ | ^Setting ^Description ^ | ||
+ | |Expression|Enter an expression that evaluates to a boolean TRUE/FALSE result. | ||
- | ^ River ^ Length (km) ^ Continent | + | \\ |
- | | Nile | 6650 | Africa | + | =====Remarks===== |
- | | Amazon | + | Examples of valid conditions: |
- | | Yangtze | + | < |
- | | Mississippi | + | [Amount]=0 |
- | | Yenisei | + | |
- | | Yellow River | 5464 | Asia | | + | [Length] * [Width] * [Height] <= 1000 |
- | | Ob | 5410 | Asia | | + | |
- | | Paraná | + | contains([City], |
+ | |||
+ | not isempty([Email]) | ||
+ | [Date] >= #2024-02-01 and [Date] <= #2024-02-29 | ||
+ | </ | ||
- | **Objective: | ||
- | **Transformation parameters:** | + | \\ |
+ | =====Examples===== | ||
+ | **Example:** Find all rivers that are longer than 6000 km.\\ | ||
- | | + | **Source table:** The longest rivers in the world |
- | * Expression: [Length (km)] > 6000 | + | ^River |
+ | | Nile | 6650| Africa | ||
+ | | Amazon | ||
+ | | Yangtze | ||
+ | | Mississippi | ||
+ | | Yenisei | ||
+ | | Yellow River | 5464| Asia | | ||
+ | | Ob | 5410| Asia| | ||
+ | | Paraná | ||
+ | \\ | ||
+ | **Action parameters: | ||
+ | > Expression: [Length (km)] > 6000 | ||
- | **Output | + | \\ |
+ | **Result | ||
+ | ^River | ||
+ | | Nile | 6650| Africa | ||
+ | | Amazon | ||
+ | | Yangtze | ||
+ | | Mississippi | ||
- | ^ River ^ Length | + | \\ |
- | | Nile | + | ====Community examples==== |
- | | Amazon | + | * [[https:// |
- | | Yangtze | + | |
- | | Mississippi | + | |
+ | | ||
+ | | ||
- | === See also === | + | \\ |
+ | =====See also===== | ||
* [[transformations: | * [[transformations: | ||
- | * [[syntax:start|Expression syntax]] | + | * [[transformations:searchfilter|Filter by search]] |
- | * [[syntax:errorpropagation|Error propagation in expressions]] | + | * [[transformations: |
+ | * [[syntax:start|Expressions: | ||
transformations/filter.1434158459.txt.gz · Last modified: 2015/06/12 21:20 by dmitry