Sparkflows now enables you to build Analytics Apps. With Analytics Apps you can capture inputs from the end user seamlessly and feed them into workflows or notebooks. The connected workflow or notebook gets executed and the results are streamed back to the user.
Below are the steps for building the Analytics App
Once you login to Fire Insights application, there is APPLICATIONS menu on top, select Analytics App.
Or create/import Analytics App inside Project
Click on CREATE APPLICATION
It would open up the Create Application Page as below.
Enter the name and other details for the new application.
Then provide details for the various fields of the new application. These fields would appear in the Analytics Application dialog when used in the workflow editor.
Adding STAGES
Click on “Add stages” button to add a new stage. Select stage type and enter the stage name.
Rearrange the stages by dragging and dropping.
One can EDIT, VIEW and REMOVE stages.
EXAMPLES FOR ADDING VARIOUS STAGES
1) Upload Stage
In upload stage , first add column component and divide in two columns.
In first column add file component to choose files to upload to databricks. In this component in File tab in “STORAGE” select “Base64”. Set its property name to file.
In other column, add one textfield to add “DESTINATION PATH” where the browse file should get uploaded. Set its property name to TRAIN_DATA.
Add upload button and set action to event. Set the button event name to upload.
Click on “DONE” or “SAVE” to save added components for that stage.
2) Parameters Stage
In parameters stage, add select, text-field, select boxes, buttons and other components. For example:
Firstly add column component and divide it in two columns.
Then, add select boxes example in first column by adding select boxes component. In this component in Data tab add all possible values you want to add.
Then, lets add select example in the second column by adding select component. In this component in Data tab add all possible values you want to add.
Add next button in second column to go to next stage and perform actions depending upon event. Set its event name as next. Also add CUSTOM CSS CLASS like float-right, float-left etc
Click on “DONE” or “SAVE” to save the added components for that stage.
3) Run Stage
In this stage you will execute the Analytics App with the added parameters in the earlier stages.
You can click on back button and change the value and run Analytics App again.
Click on “RUN” button to execute the app and view the results.
Integrating with Databricks Notebook
The Web App in Fire Insights can trigger a Notebook in Databricks.
Fire Insights passes 2 parameters to the Notebook:
postback-url job-id
Add wheel file to your Databricks Notebook
Add the wheel file to your Databricks Notebook. This is to enable using the Fire Insights API’s for sending data to it.
Outputing details to Fire Insights
The Databricks Notebook can output text, tables and charts to be dispalyed in Fire Insights.
Running Analytics App
Once the Analytics App has been created, they can be executed.
Below are the steps for executing an Analytics App.
Click on Run App Button
Go through the various Stages
コメント