Icon

03_​Transform_​Using_​Rule_​Engine_​and_​String_​Manipulation_​Node

Transform Data using Rule Engine and String Manipulation nodes

This Workflow demonstrates the usage of "String Manipulation" and "Rule Engine" nodes for data transformation. The objective of the workflow is to summarize the Airline Dataset and analyze the delayed flight and provide route details.







Create a column for Route using StringManipulation NodeStep 1: Double Click on the "String Manipulation" node toopen the dialog boxStep 2: In the "String Manipulation" tab, go to the"Expressions" section and enter the following rulejoin($Origin$,"-",$Dest$)This will concatenate the Origin Airport with the DestinationAirport with a hyphen in between. Select the option of"Append Column" and a new column will be appended tothe output.Step 3 : Select "OK" and close the dialog box, now rightclick on the node and select on execute to get the newcolumn "Route" Create a column for Status using Rule Engine NodeStep 1: Double Click on the "Rule Engine" node to open the dialog boxStep 2: In the "Rule Editor" tab, go to the "Expressions" section and enter the following rule$DepDelay$ > 15 =>"Delayed"TRUE =>"Not Delayed"This will create a rule, where the flights with departure delay>15 willbe given status as "Delayed" while the rest of them will be labeled as"Not Delayed". Choose Append Column option and name the newcolumn as "Status"Step 3 : Select "OK" and close the dialog box, now right click on thenode and select on execute to get the new column "Status" in theoutput table Load Airline DatasetCreate Route ColOrigin-DestinationFlights dep delay > 15havestatus "Delayed"#delayed flights by RouteFilter Delayed FlightsShow the Routesin order ofmaximum delayed flights CSV Reader String Manipulation Rule Engine GroupBy Row Filter Column Rename Sorter Table View Create a column for Route using StringManipulation NodeStep 1: Double Click on the "String Manipulation" node toopen the dialog boxStep 2: In the "String Manipulation" tab, go to the"Expressions" section and enter the following rulejoin($Origin$,"-",$Dest$)This will concatenate the Origin Airport with the DestinationAirport with a hyphen in between. Select the option of"Append Column" and a new column will be appended tothe output.Step 3 : Select "OK" and close the dialog box, now rightclick on the node and select on execute to get the newcolumn "Route" Create a column for Status using Rule Engine NodeStep 1: Double Click on the "Rule Engine" node to open the dialog boxStep 2: In the "Rule Editor" tab, go to the "Expressions" section and enter the following rule$DepDelay$ > 15 =>"Delayed"TRUE =>"Not Delayed"This will create a rule, where the flights with departure delay>15 willbe given status as "Delayed" while the rest of them will be labeled as"Not Delayed". Choose Append Column option and name the newcolumn as "Status"Step 3 : Select "OK" and close the dialog box, now right click on thenode and select on execute to get the new column "Status" in theoutput table Load Airline DatasetCreate Route ColOrigin-DestinationFlights dep delay > 15havestatus "Delayed"#delayed flights by RouteFilter Delayed FlightsShow the Routesin order ofmaximum delayed flights CSV Reader String Manipulation Rule Engine GroupBy Row Filter Column Rename Sorter Table View

Nodes

Extensions

Links