User Tools

Site Tools


transformations:subfield

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
transformations:subfield [2016/06/19 19:38] – created dmitrytransformations:subfield [2021/04/20 13:43] craigt
Line 1: Line 1:
-===== Split column into rows =====+{{ transformations:SubfieldAction.png}} 
 +====== SPLIT DELIMITED TEXT INTO ROWS ====== 
 +Category: Transform / Advanced \\
  
-Split column values delimited with a separator (e.g. comma) into multiple rows -- one row per value.+\\  
 +=====Description===== 
 +This action splits column values delimited with a separator (e.g. comma) into multiple rows -- one row per value. Values in other columns are duplicated in the new rows.\\
  
-For instance, a column value+\\ 
 +=====Use cases===== 
 +This action can be useful in cases where individual values are concatenatedwith delimiter, in a single column that should be broken out into individual records.
  
-  one;two;three +\\  
-   +=====Action settings===== 
-will be split into three rows+^Setting^Description^ 
 +|Column|Select the column containing the delimited text to be split.| 
 +|Separator|Select the delimiting character to split the text by.  Options:  //Comma//, //Semicolon//, //Tab//, //Pipe//, //Tilde//, //Space//,//Line break//, and\\ //Custom// (and select the character from the dialog that displays). | 
 +|Ignore quoting |When selected, delimiting characters contained within paired quotation marks will be used for splitting text. | 
 + 
 +\\  
 +=====Remarks===== 
 +Unlike the [[transformations:splitdelimitedtext|Split delimited text into columns]] action, in which you have to define the new columns to receive the split values, this action will create as many new rows as necessary to output all split values in the selected column. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +**Example 1:** A value with 3 words, delimited with semicolons, will be split into three rows:\\ 
 + 
 +**Source table:** 
 +^Row no ^Numbers ^ 
 +| 1|one;two;three | 
 +\\  
 +**Action parameters:** 
 +> Column: "Numbers" 
 +> Delimiter: Semicolon 
 +\\  
 +**Result:** 
 +^ Row no ^ Numbers ^ 
 +| 1|one   | 
 +| 1|two   | 
 +| 1|three | 
 + 
 +\\   \\  
 +**Example 2:** A column with multi-line text values.\\ 
 + 
 +**Source table:** 
 +^ Location No ^ Location ^ 
 +| 1| Mississauga \\ Ontario \\ Canada \\ North America | 
 +| 2| Cambridge \\ Massachusetts \\ United States \\ North America | 
 +\\  
 +**Action parameters:** 
 +> Column: "Location" 
 +> Delimiter: Line break 
 +\\  
 +**Result:** 
 +^ Location No ^ Location ^ 
 +| 1| Mississauga    | 
 +| 1| Ontario        |  
 +| 1| Canada         | 
 +| 1| North America  | 
 +| 2| Cambridge      |  
 +| 2| Massachusetts  |  
 +| 2| United States  |  
 +| 2| North America 
 + 
 +\\ \\  
 +**Example 3:** Split out Order IDs into rows to create unique Customer-Order ID records.\\ 
 + 
 +**Source table:** 
 +^Customer ID^Order IDs^ 
 +|CUST001  |ORD001, ORD005, ORD010 
 +|CUST002  |ORD002, ORD003, ORD009 
 +|CUST003  |ORD004, ORD006, ORD007, ORD008 
 +\\  
 +**Action parameters:** 
 +> Column: "Order IDs" 
 +> Separator: Comma 
 +\\  
 +**Result:** 
 +^Customer ID^Order IDs^ 
 +|CUST001  |ORD001 
 +|CUST001  |ORD005 
 +|CUST001  |ORD010 
 +|CUST002  |ORD002 
 +|CUST002  |ORD003 
 +|CUST002  |ORD009 
 +|CUST003  |ORD004 
 +|CUST003  |ORD006 
 +|CUST003  |ORD007 
 +|CUST003  |ORD008 
 + 
 +\\  
 +=====See also===== 
 +  * [[transformations:importtext|Import delimited text file]] 
 +  * [[transformations:splitdelimitedtext|Split delimited text into columns]]
  
-  one 
-  two 
-  three 
-   
-Values in other columns are duplicates for the new rows. 
transformations/subfield.txt · Last modified: 2023/10/11 20:54 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki