Icon

Field Types and Conversions Solution

There has been no title set for this workflow's metadata.

There has been no description set for this workflow's metadata.

Field Types and Conversions SolutionIn this lesson’s practice problem, we have a data set detailing state government employees in New Mexico. Among the 18 fields we have BUDescription, Filled/Vacant, Position Start date, and Annual Salary. There are two versions of this practice problem:1) You are only given the input and output data sets. You must figure out which nodes to use, how to configure them, and how to organize yourworkflow in order to generate the desired output.2) In addition to the input and output data sets, we have provided an outline of which nodes to use at which steps to guide you along. Note thatthis is only one possible solution, as there are many ways a problem can be solved in KNIME.Using this table, we must perform several tasks:• Convert all fields to their appropriate field types. You may use whatever methods and nodes you desire, so long as types are set properly.• Filter the data set to show only positions whose start date was in the year 2021.• Pivot the data to show the average annual salary of each BU by full or part time status.• Find a node that will convert the average annual salary from a double to an integer.• Finally, sort the data to show the highest average annual salary for full time employees first. What BU has the highest average annual salary? INPUT DATA FIELD TYPE CONVERSIONNODES DATE&TIME-BASED ROW FILTER PIVOTING DOUBLE TO INT SORTER FIELD TYPE CONVERSIONNODES You may be wondering why we used both a String to Date&Time and Column Auto Type Cast node for our fieldtype conversions. The reason is that the auto type cast sets Position Start Date as a Date & Time type.Unfortunately, the Date&Time-based Row Filter cannot use this field type. By using String to Date&Time we canassure the field is correctly set. Convert remaining fieldsautomaticallyFilter for only 2021Change Position Start Dateto date typePivot data by BU, cols by FT/PT status, avg. annual salaryConvert double fields to integerSort FT avg indescending orderNew Mexicostate employees Column AutoType Cast Date&Time-basedRow Filter String to Date&Time Pivot Double To Integer Sorter Table Reader Field Types and Conversions SolutionIn this lesson’s practice problem, we have a data set detailing state government employees in New Mexico. Among the 18 fields we have BUDescription, Filled/Vacant, Position Start date, and Annual Salary. There are two versions of this practice problem:1) You are only given the input and output data sets. You must figure out which nodes to use, how to configure them, and how to organize yourworkflow in order to generate the desired output.2) In addition to the input and output data sets, we have provided an outline of which nodes to use at which steps to guide you along. Note thatthis is only one possible solution, as there are many ways a problem can be solved in KNIME.Using this table, we must perform several tasks:• Convert all fields to their appropriate field types. You may use whatever methods and nodes you desire, so long as types are set properly.• Filter the data set to show only positions whose start date was in the year 2021.• Pivot the data to show the average annual salary of each BU by full or part time status.• Find a node that will convert the average annual salary from a double to an integer.• Finally, sort the data to show the highest average annual salary for full time employees first. What BU has the highest average annual salary? INPUT DATA FIELD TYPE CONVERSIONNODES DATE&TIME-BASED ROW FILTER PIVOTING DOUBLE TO INT SORTER FIELD TYPE CONVERSIONNODES You may be wondering why we used both a String to Date&Time and Column Auto Type Cast node for our fieldtype conversions. The reason is that the auto type cast sets Position Start Date as a Date & Time type.Unfortunately, the Date&Time-based Row Filter cannot use this field type. By using String to Date&Time we canassure the field is correctly set. Convert remaining fieldsautomaticallyFilter for only 2021Change Position Start Dateto date typePivot data by BU, cols by FT/PT status, avg. annual salaryConvert double fields to integerSort FT avg indescending orderNew Mexicostate employees Column AutoType Cast Date&Time-basedRow Filter String to Date&Time Pivot Double To Integer Sorter Table Reader

Nodes

Extensions

Links