- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on
08-02-2023
07:47 AM
- edited on
08-03-2023
01:34 AM
by
VidyaSargur
Introduction:
Prerequisites:
- Apache NiFi instance is running.
- CML's AMP Customer Churn App is running with a Churn Model deployed.
- Download the user data file and Apache Nifi flow from this repo.
- The user data file needs to be added to the file location where NiFi's GetFile Processor has permissions.
Launch CML Churn AMP
In the AMP catalog, select Churn Modeling with skit-learn, and configure a new project. This will take 5-7 minutes to complete. You will need to deploy a model inside of CML, which isn't in the scope of this article. Once you finish, you will be able to see the following screen, which will provide the URL location and API key for the model.
NiFi Flow Overview:
Processor Configuration:
GetFile Processor
In the GetFile processor, the input directory needs to contain the customer JSON file that is included with the article.
EvaluateJSON Processor
The included Data Flow file has this processor configured, but this step is essential to appreciate. This processor will take values from the JSON file and add them as attribute values. Once these values are an attribute, they can be used to call the model in the next step.
InvokeHTTP Processor
Successful Results
Once the processors have been configured, the model can be called the results can be displayed by opening the queue and selecting the response value.
Created on 08-07-2023 07:09 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ibrooks Excellent article here. I will definitely be using this in my CML Demos going foward. I just sent a PR w/ some flow improvements you may like to use as well.