Icon

01b Restaurants Inspection ETL Pipeline - Production

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

Learning objective: In this exercise you'll learn triggered execution of the workflow on KNIME Hub

Workflow description: This workflow showcases the steps in setting up the triggered execution of a workflow on KNIME Hub. Find below the two major tasks performed in this workflow

Read the PDF and JSON files that contain the Inspection score and Inspection reviews of the restaurants

Transform the data with the data transformation workflow and build the data pipeline for production

Set up the trigger on KNIME Hub based on the desired event

Step 3 : Write the transformed data to Production database

  1. Connect to PostgreSQL Development database

    • Provide the username, password, hostname and database name as "l3deprod" provided by the instructors in the PostgreSQL Connection component to connect

    • Provide User schema as userXX and table name as "Inspection-cleaned" in the component

Step 2 : Call the Data Transformation workflow on the KNIME Hub

  1. Connect to KNIME Business Hub

    • Use space connector node to connect to KNIME Business Hub similar to the last exercise


  2. Provide path of the data transformation workflow to the Call Workflow Service node:

    • name of the workflow : 'Inspection Results Transformation Workflow'


Step 1 : Trigger the workflow when a file is uploaded to the space

  1. Notify when the file is uploaded to the hub

    • Use Container Input (Repository Event) node to capture event details about what was changed on the space

    • Connect the output of Container Input (Repository Event) node to the top input of PDF filepath node

  2. Connect to KNIME Business Hub

    • Use Space Connector node to connect to your private space on the KNIME Business Hub

    • Set knime-edu-hub as the Hub mountpoint, and select the space (User##) provided by your trainer

    • Create a folder called "Inspection" in your user space on KNIME Business Hub

    • Set the working directory as '/Inspection'


Learning objective: In this exercise you'll learn triggered execution of the workflow on KNIME Hub


Workflow description: This workflow showcases the steps in setting up the triggered execution of a workflow on KNIME Hub. Find below the two major tasks performed in this workflow

  • Read the PDF and JSON files that contain the Inspection score and Inspection reviews of the restaurants

  • Transform the data with the data transformation workflow and build the data pipeline for production

  • Set up the trigger on KNIME Hub based on the desired event


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

Extract
Transform
Load
Step 4 : Upload the workflow to KNIME hub and create a trigger to schedule the workflow

  1. 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)

  2. Create a version of your workflow

    • On the workflow page, click Space history

    • In the new menu, click Create version and name it as 'Version_trigger_1'

  3. Create a triggered schedule on KNIME Hub

    • Click on deploy button and select create trigger option

    • Provide the Deployment name as "UserXX-triggered-execution"

    • Select the latest created version 'Version_trigger_1'

    • Select Space as "ExerciseSpace-UserXX", Item Type as "File" and File Type as "Data file"

    • Select Action as "Added" and Additional filtering as "By subfolder" and specify the path as "/Inspection"

    • Click the Create button

  4. Place a PDF file of reviews in your Inspection folder on space to run the workflow

    • Select any PDF in the data/Inspection folder of your local space and click "Upload to Hub"

    • Notice that, now a new inspection report is added and the execution of an ETL pipeline that saves new inspections results to a database is triggered automatically


PDF files for Inspection are provided in the "Data" folder



Session 3 - ETL and ELT; Data Pipelines Validation and Deployment Automation

Exercise 1b : Create a Triggered Execution

Production Database


append:inspection-cleaned
DB Writer
Space Connector
... to a KNIMEBusiness Hub space
Space Connector
PDF filepath
Production DB
PostgreSQL Connection
GitHub repo
Downlaod from GitHub Repo
Call Workflow Service
Read Inspection Reviews
JSON Reader

Nodes

Extensions

Links