Icon

Exercise 01 Data Validation & Statistics Process Control

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

Learning objective: In this exercise you'll learn how to create data validation workflow

Workflow description: This workflow showcases the steps in creating the data validation workflow that implements the data checks for incoming data . Find below the two major tasks performed in this workflow

Check if the input data is empty, also check if the input data has all the expected columns

Check the statistics of the incoming data and raise error if it is out of expected range

Step 1 : Input data validation

  1. Validate the Input Columns DataTypes

    • Drag Table Validator node, and connect the output of String to Number node to it

    • In the configuration tab of Table Validator node select all the columns in the left and drag it to 'Drop columns to add a new configuration' section

    • Connect the output of Table Validator node to the Table Row to Variable node

  2. Statistical Process Control

    • Drag Math Formula node to calculate max price

    • In the Math Formula node append a column 'Max_price' containing maximum price *

    • Use a Rule Engine node to raise error if max price is less than 0* and the output of the Rule Engine should be named "price_flag"

    • Connect the output of Rule Engine node to Table Row to Variable node

    • Execute the Entire workflow

  3. Reset the workflow and upload to your User space on KNIME Hub

    • Reset the workflow by clicking the 'Reset all' button

    • Right click on the workflow and select Upload to Server or Hub to (OR drag and drop OR copy and paste)


*Use the Expression COL_MAX($Price$)

*$Max_price$ < 0 => 1



Check if Input Data file is empty
Validate the Input Columns DataTypes
Statistical Process Control

Learning objective: In this exercise you'll learn how to create data validation workflow


Workflow description: This workflow showcases the steps in creating the data validation workflow that implements the data checks for incoming data . Find below the two major tasks performed in this workflow

  • Check if the input data is empty, also check if the input data has all the expected columns

  • Check the statistics of the incoming data and raise error if it is out of expected range


You'll find the instructions to the exercises in the yellow annotations.

Session 4 - Best Practices when Productionizing Data Pipelines

Exercise 1: Data Validation & Statistics Process Control

Status in case of Success
Variable Creator
Merge Variables
Capture informationrelated to testexecution
Variable To Table Row
Default data
Table Reader
Workflow execution status and metadata
Workflow Service Output
Status in case of Failure
Variable Creator
Export status and metadata
Catch Errors (Var Ports)
Workflow Metadata
empty table check
Rule Engine Variable
Workflow Service Input
Table Row To Variable
Active Branch Inverter
Column Renamer
CASE Switch Start
String To Number
String To Number
Extract Table Dimension
Table Row To Variable
Column Resorter
CASE Switch Start
pass through input data for further process
Workflow Service Output
Try (Variable Ports)

Nodes

Extensions

Links