Procedure
-
Double-click the tFileInputDelimited
component to open its Basic settings view
in the Component tab.
-
Click the [...] button next to the
File name/Stream field to browse to the
file where you want to extract information from.
The input file used in this scenario is called test4. It is a text file that holds three columns: id, email, and age.
id;email;age 1;anna@yahoo.net;24 2;diana@sohu.com;31 3;fiona@gmail.org;20
For more information, see tfileinputdelimited_c.html. - Click Edit schema to define the data structure of this input file.
-
Double-click the tExtractRegexFields
component to open its Basic settings
view.
- Select the column to split from the Field to split list: email in this scenario.
-
Enter the regular expression you want to use to perform data matching in
the Regex panel. In this scenario, the
regular expression
"([a-z]*)@([a-z]*).([a-z]*)"
is used to match the three parts of an email address: user name, domain name and TLD name.For more information about the regular expression, see http://en.wikipedia.org/wiki/Regular_expression. -
Click Edit schema to open the Schema of tExtractRegexFields dialog box, and
click the plus button to add five columns for the output schema.
In this scenario, we want to split the input email column into three columns in the output flow, name, domain, and tld. The two other input columns will be extracted as they are.
- Double-click the tLogRow component to open its Component view.
- In the Mode area, select Table (print values in cells of a table).