Icon

01 Data validation & Statistics Process Control

This workflow implements the input data validation and checks:
Annotations and comments
  • Part 3 - Data governance and best practices Exercise 01 Data validation & Statistics Process Control
  • Step 1. Empty table check Execute the Extract Table Dimension node - it exports the flow variable Number Rows Add the Breakpoint node and enable the breakpoint when variable Number Rows = 0
  • Step 4. Upload to KNIME Business Hub Reset the workflow and upload to your user space on KNIME Business Hub
  • Learning objective: Learn how to create a workflow for input data validation Workflow description: This workflow implements the input data validation and checks: Whether input data table is empty, Whether input data has all the required columns, Statistical properties of the input data, And raises error if any of the tests fails. You'll find the instructions to the exercises in the yellow annotations.
  • Step 2. Table structure validation Add the Table Validator node between the Workflow Service Input and the Breakpoint nodes In the configuration of the Table Validator node, add a new column group by double clicking on the column and drag all the other columns to this group Add the Breakpoint node and enable the breakpoint for inactive branch
  • Step 3. Statistical Process Control Create an error trigger if the maximal price is unexpectedly high: Use the Expression node to calculate the maximum price in the Price column. Convert the maximum price to a flow variable with Table Row to Variable node. Use the Variable Expression node to check if the maximal price is higher than 1000 and append a new variable price_flag of type integer with the value 1 if the maximal price is higher, and 0 otherwise. Add the Breakpoint node and enable the breakpoint when variable price_flag = 1
  • Rows number = 0 => failure
  • Wrong data types, missing or unknown columns > failure
  • Max price > 1000 -> failure
  • Export status and metadata
  • Max price
  • Number of rows
  • Price to double
  • Example data for workflow development Will be replaced by the data from the caller
  • Check data types & columns presence
  • Status in case of Success
  • Status in case of Failure
  • Raise error if max price > 1000
  • Capture information related to test execution
  • Timestamp
  • User
  • Default status variables 0 - success 1 - error
  • Workflow execution status and metadata

Nodes

Extensions

Links