Using Qlik Predict connections in visualization expressions
You can use the analytic connections in visualization expressions. The syntax when using the analytic connections in expressions must follow the server-side extensions syntax.
Data should be processed in a visualization expression only when it will dynamically change based on the input from a user. If the transaction from the data model will always be the same, the prediction should instead be calculated in the load script and cached in the data model.
If the use case is based on user input, you can use an analytic connection and corresponding server-side extension syntax in your chart expression to create interactive charts that visualize data received from the model endpoints.
Do the following:
-
When editing a visualization, click
to enter the expression editor.
-
In the expression editor, enter an expression in the expression field. The expression must be constructed using the server side extension syntax.
Working with the expression editor
Requirements for auto-engineered date features
When you use a Qlik Predict analytics connection in a visualization expression, you are running predictions with a Qlik Predict deployed model.
There are specific requirements for date formatting when running predictions from a model trained on date feature columns. For these columns, the data you provide to the Qlik Predict analytics connection must meet the following requirements:
-
Date and datetime values must be strings formatted in accordance with ISO 8601 standards. Examples:
-
2020-01-14
-
2020-01-14T00:00:00.000Z
-
-
The parent date—the feature from which the date parts were derived—must be included in its entirety. For example, your model might only use a Year feature but you still need to provide the date in ISO 8601-compliant format.
-
Data within each column needs to be of the same time zone.
The above requirements:
-
Only apply for features trained with date feature engineering. If the feature type is manually changed to the categorical feature type, these requirements do not apply. If the feature type has been changed to categorical, provide the column, in the date format in which it was originally used for training, in the apply data.
-
Do not apply to time series models.
For more information about working with date features in predictions, see Working with date features in predictions.
Example
Here is an example of a call made to a Qlik Predict deployment that provides banking customer churn prediction.