See for yourself how easy it is to create a simple inventory management web application using Cloudera Operational Database (COD) and Cloudera Machine Learning (CML) on Cloudera Data Platform (CDP).
There are two (2) options in getting assets for this tutorial:
It contains only necessary files used in this tutorial. Remember its location. No need to unzip the file.
It provides assets used in this and other tutorials; organized by tutorial title.
Two simple pieces of information are needed to create a database - the Environment name and Database name. For example:
In the ML Workspaces section, select Provision Workspace.
Two simple pieces of information are needed to provision an ML workspace - the Workspace name and the Environment name. For example:
Beginning from the ML Workspaces section, open your workspace by selecting its name, cml-tutorial.
Select New Project
Complete the New Project form using:
Simple inventory management system using Cloudera Operational Database (COD)
Beginning from the Projects section, select the project name, opdb-web-application.
Select New Session and complete the session form:
Let’s make a minor configuration change and install the dependencies:
[COD] Username=<cdp_workload_username> Password=<cdp_workload_password> Url=<URL from Phoenix Thin JDBC connection> Serialization=PROTOBUF Authentication=BASIC
Save the file as config.ini: File > Save As > config.ini
!pip3 install -r requirements.txt
In the same session (or a new one), let’s create and populate a table that we’ll be using in our application.
Select file db_setup.py and click on
Let’s create our inventory management system web application.
Beginning from the Applications section, select New Application and fill out the form as follows:
Simple inventory management system
After a few moments, the application is up and running. Select the application’s name, opdb-web-app, to open the web application.
This web application accepts a part number and quantity. It first verifies that the part exists, if it does, it will decrease/increase the quantity on hand. For example:
A positive quantity value, decreases the quantity on hand.
A negative quantity value, increases the quantity on hand.
This may have been caused by one of the following: