Create Predicted Eventlog: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
# Create a Snowflake-managed stage with name '''PREDICTION''' to the same schema that is configured for QPR ProcessAnalyzer (in the Snowflake connection string). | # Create a Snowflake-managed stage with name '''PREDICTION''' to the same schema that is configured for QPR ProcessAnalyzer (in the Snowflake connection string). | ||
# Open the created stage and upload the '''predict.pyz''' file to the stage (ask the file from your QPR representative). | # Open the created stage and upload the '''predict.pyz''' file to the stage (ask the file from your QPR representative). | ||
# Create the procedure procedure to the same schema. | # Create the procedure procedure to the same schema.<pre> | ||
<pre> | |||
CREATE OR REPLACE PROCEDURE QPRPA_SP_PREDICTION("CONFIGURATION" OBJECT) | CREATE OR REPLACE PROCEDURE QPRPA_SP_PREDICTION("CONFIGURATION" OBJECT) | ||
RETURNS OBJECT | RETURNS OBJECT | ||
Line 30: | Line 28: | ||
'; | '; | ||
</pre> | </pre> | ||
# awef |
Revision as of 09:52, 15 February 2024
Prerequisites
Following prerequisites need to be fullfilled to run the eventlog prediction:
- QPR ProcessAnalyzer 2024.2 or later
- Snowflake is configured
- Source model is stored to Snowflake
Prediction installation
Follow these steps to install the eventlog prediction:
- Create a Snowflake-managed stage with name PREDICTION to the same schema that is configured for QPR ProcessAnalyzer (in the Snowflake connection string).
- Open the created stage and upload the predict.pyz file to the stage (ask the file from your QPR representative).
- Create the procedure procedure to the same schema.
CREATE OR REPLACE PROCEDURE QPRPA_SP_PREDICTION("CONFIGURATION" OBJECT) RETURNS OBJECT LANGUAGE PYTHON STRICT RUNTIME_VERSION = '3.8' PACKAGES = ('nltk','numpy','pandas==1.5.3','scikit-learn','snowflake-snowpark-python','tensorflow','dill','prophet','holidays==0.18','python-kubernetes','docker-py') HANDLER = 'main' EXECUTE AS OWNER AS ' import sys def main(session, parameters_in: dict) -> dict: session.file.get(''@prediction/predict.pyz'', ''/tmp'') sys.path.append(''/tmp/predict.pyz'') import predict return predict.main(session, parameters_in) ';
- awef