Icon

03.3 Call the prediction workflow from a data app - exercise

Calling a prediction workflow via a data app. Example scenario: The bank provides their employees with the credit scoring data app to score the applicants as they call / come to the bank office. The data app allows an employee to insert the applicant data, pulls additional data about credit history from the bank database, calls the deployed prediction workflow, and returns the score.

Part 1 - Deployment fundamentals

Exercise workflow 03.3 Call the prediction workflow from a data app

Learning objective: In this exercise you'll learn how to call a prediction workflow from a data app.


Workflow description: Calling a prediction workflow via a data app. Example scenario: The bank provides their employees with the credit scoring data app to score the applicants as they call / come to the bank office. The data app allows an employee to insert the applicant data, pulls additional data about credit history from the bank database, calls the deployed prediction workflow, and returns the score.


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

Step 1. Call the prediction workflow from a data app

  1. Open the component and follow the instructions inside

  2. Once completed, execute the component and open its interactive view to preview the data app. Try different input values. Try to calculate scoring for customer 112 - and explore why they get rejected.


Step 2. Upload this workflow to KNIME Hub

  1. Reset, save, and upload this workflow to your user space on the KNIME Hub.

  2. Create a new version of the workflow

Step 3. Test the data app via an ad hoc execution on KNIME Hub

  1. On the workflow page on the KNIME Hub, click Run

    1. In the new menu, select a valid execution context*, click Run

    2. Ad hoc execution is created: in the case of the data app, the new tab is opened in your browser

    3. Interact with the data app


* If there is only one execution context available, it will be selected by default and won't be modifiable

Step 4. Deploy this workflow as a data app and manage access

  1. On the workflow page on the KNIME Hub, click Deploy and Create data app

    1. In the new menu, provide a name for your data app, e.g., Credit scoring app

    2. Select the latest workflow version that you created and a valid execution context*

    3. Provide the category Credit scoring and a description of the data app

    4. In Advanced settings, select the User execution scope, and create the deployment

  2. On the workflow page, find the created deployment, click three dots actions button and click Manage access

    • In the new menu, you can share the deployment with the bank employees. For now, share it with yourself.

  3. On your profile page, open the Data Apps Portal**

    • Find the deployed credit scoring data app and click the Run button


* If there is only one execution context available, it will be selected by default and won't be modifiable

** From here you can't edit the workflow but can just use the data app as final user called consumer

You can save the predictions for further usage in production and further model monitoring. For example, you save them a timestamp to a database.

For simplicity, we read this data from a workflow data area. In a real scenario, these data would reside on a database or a data warehouse.

Credit history
Table Reader
Credit Scoring Data App

Nodes

Extensions

Links