User Tools

Site Tools


transformations:selectbylookup
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Next revision
transformations:selectbylookup [2021/04/12 00:55] craigt
Line 1: Line 1:
 +{{ transformations:SelectColumnsWithLookupAction.png}}
 +====== SELECT  BY LOOKUP ======
 +Category: Transform / Advanced\\
 +
 +\\ 
 +=====Description=====
 +This action selects (keeps) columns which names are listed in another table. \\
 +
 +\\ 
 +=====Use cases=====
 +This action is typically used when the names of columns to select are not known in advance and have to be obtained dynamically during a calculation.
 +
 +\\ 
 +=====Action settings=====
 +^Setting^Description^
 +|Table|Select the table containing the column name values.|
 +|Column|Select the column in the selected table that contains the column name values.|
 +|Ignore case|When selected, case is not considered when matching column names in the current dataset to the column name\\ values in the second dataset.|
 +
 +\\ 
 +=====Examples=====
 +
 +**Objective:** Keep only the columns in Table 1 that are listed in Table 2 (River, Length (km), and Outflow).\\
 +\\  
 +**Table 1:** River lengths.
 +^River  ^Length (km)  ^Continent  ^Outflow  ^  
 +| Nile  |  6650|Africa  |Mediterranean 
 +| Amazon  |  6400|South America  |Atlantic Ocean  |
 +| Yangtze  |  6300|Asia  |East China Sea  |
 +| Mississippi  |  6275|North America  |Gulf of Mexico  |
 +
 +**Table 2:** Columns to select (keep)
 +^Heading names^
 +|River|
 +|Length (KM)|
 +|Outflow|
 +
 +\\ 
 +**Action parameters:**
 +>Table is "Table 2"
 +>Columns is "Heading names" (in Table 2)
 +>Ignore case is "checked"
 +\\ 
 +**Result:** 
 +^River  ^Length (km)  ^Outflow  ^  
 +| Nile  |  6650|Mediterranean 
 +| Amazon  |  6400|Atlantic Ocean  |
 +| Yangtze  |  6300|East China Sea  |
 +| Mississippi  |  6275|Gulf of Mexico  |
 +If //Ignore case// was not checked, the "Length (km)" column would not have been selected.
 +
 +\\ 
 +=====See also=====
 +  * [[transformations:remove|Remove Columns]]
 +  * [[transformations:lookuprename|Rename with lookup]]
 +  * [[transformations:select|Select Columns]]
  
transformations/selectbylookup.txt · Last modified: 2021/07/19 02:18 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki