tr_read_textRead TextThe workflow loads an unstructured list of orders, flattens field1 into 4 stream fields:
- productline
- customer
- status
- order_value
Further stream fields are added based onthe capture group constructs that resolve order_status & order_date.
Repeating text is removed from the order_value stream field, before the order_value is formatted: $#.001.0Normal2/
0.00.0100005050NY50000YN10001002010/10/02 15:57:36.812admin2017/05/14 14:04:37.534H4sIAAAAAAAAAAMAAAAAAAAAAAA=NThis guided demonstration illustrates the options available in the Text File Input step. The data in the text file
is flattened, parsed to capture groups, before the price is defined with the data type: Number.
1288065884Calibri Light11NN000255255255255255255YLab 1: Text File Input 1283216130Segoe UI11YN000255255255255255255Y - read a list of orders.
22420812441Segoe UI9NN000255255255192192192YThe RegEx expression creates 2 capture groups:
order_status: (Delivered | Returned)
order_date: (.+)28840025858Segoe UI9NN000255255255192192192YGeneral Guidelines:
- separator: TAB
- there's a white space after Order Value:41620822458Segoe UI9NN000255255255192192192Yread order listflatten rowsYdiscard textschange order_value metadataYparse statusdiscard textsYflatten rowsparse statusYchange order_value metadataSelectValuesY1noneNresultstatusorder_valueorder_valueNumber-2-2#.00falsefalseorder_dateorder_dateDate-2-2MMM yyyyfalsefalse576320Ydiscard textsReplaceStringY1noneorder_valuenoOrder Value: $NnononoproductlinenoProductline: NnononocustomersnoCustomer: Nnonono432320Yflatten rowsFlattenerY1noneField1productlinecustomersstatusorder_value160320Yparse statusRegexEvalY1nonestatusresultNYNNNNNNNNorder_statusString-1-1bothorder_dateStringMMM yyyy-1-1both288320Yread order listTextFileInputY1noneNNfilename"NN11N1N800YNNNmixedCharactersY${Internal.Entry.Current.Directory}\orders.txtNNCSVNoneField1String£.,--126-1noneN0NNNwarningerrorlineYen_US160160YN