SAP HANA Automated Predictive Library (APL)
As of 2026-09-25
What is SAP HANA Automated Predictive Library (APL)?
APL is SAP HANA's automated-ML AFL component: SAP's own sample code shows the APL/VariableAutoSelection flag doing the feature-selection work a PAL call leaves to the caller, across a function set spanning classification, regression, forecasting, key influencers, recommenders, social-network modeling and data-drift monitoring. It's the one library SAP names directly as what Smart Predict delegates to on live on-premise HANA connections.
What APL automates, and how SAP's own code proves it
The Automated Predictive Library (APL) is SAP HANA's automated-machine-learning counterpart to PAL (C343): both are AFL — Application Function Library — components, both compute inside HANA, but APL trims the surface a caller has to configure. Where a PAL classification call passes an explicit parameter table naming an algorithm and its hyperparameters (C343), SAP's own APL sample code for a classification model sets three configuration entries and lets APL do the rest: APL/ModelType ("binary classification"), APL/CuttingStrategy ("random with no test"), and — the one that matters most — APL/VariableAutoSelection set to true. That single flag is the concrete, documented mechanism behind the word "automated" in APL's name: the library decides which of the input variables actually belong in the model, rather than a data scientist deciding it upfront.
APL runs inside its own schema, SAP_PA_APL, with dedicated table types for models, logs, summaries and debrief metrics (MODEL_BIN_OID, OPERATION_LOG, SUMMARY, DEBRIEF_METRIC_OID, DEBRIEF_PROPERTY_OID) — the schema name alone is worth recognizing in a client's system as evidence APL is installed and in use.
Why it matters
- APL/VariableAutoSelection is the concrete, documented mechanism behind "automated" in APL's name — a consultant can point to this specific flag instead of describing automation vaguely.
- APL's function set is materially broader than the three scenarios Smart Predict exposes in the SAC UI (C341): recommenders, social-network modeling and data-drift monitoring are APL capabilities without a direct Smart Predict UI equivalent.
- SAP names APL directly as what Smart Predict delegates to for live on-premise HANA connections — the one place in the documentation that ties C341, C343 and C344 together concretely.
Key points
- APL is HANA's automated-ML AFL component; SAP's own sample code sets APL/ModelType, APL/CuttingStrategy and APL/VariableAutoSelection=true instead of naming an algorithm and tuning parameters.
- APL runs in its own SAP_PA_APL schema with dedicated table types for models, logs, summaries and debrief metrics.
- Predictive model functions (lifecycle): CREATE_MODEL(_AND_TRAIN), TRAIN_MODEL, RETRAIN_MODEL, UPDATE_MODEL, APPLY_MODEL(_AND_TEST), TEST_MODEL, PUBLISH_MODEL, EXPORT_APPLY_CODE, GET_MODEL_INFO/DEBRIEF, GET_VARIABLE_INDICATORS.
- Predictive business functions (scenario coverage): FORECAST/FORECAST_AND_DEBRIEF (time series), KEY_INFLUENCERS, RECOMMEND family (recommenders), CREATE_SOCIAL_MODEL_AND_TRAIN/APPLY_SOCIAL_MODEL (social-network modeling), PROFILE_DATA family, SCORING_EQUATION.
- Data drift detection is a distinct, documented APL capability with learn/report and detect/report examples, including segmentation by a dimension like country.
- EXPORT_APPLY_CODE lets APL generate scoring code deployable outside HANA — but the automated variable-selection decisions behind it remain APL's.
- Called via direct SQL against AFL procedures, or via hana-ml's hana_ml.algorithms.apl module in Python — both paths run the same automated logic.
- SAP's own Smart Predict live-connectivity documentation states execution is delegated to APL for on-premise live connections — the one place this dependency is named directly.
Terms used on this page
- APL/VariableAutoSelection
- The APL configuration flag documented in SAP's own sample code that turns on automated feature/variable selection.
- SAP_PA_APL
- The dedicated HANA schema APL runs in, with its own model, log, summary and debrief table types.
- EXPORT_APPLY_CODE
- APL function that generates scoring code deployable outside SAP HANA, based on a trained APL model.
- Data drift (APL)
- APL's dedicated capability to learn a baseline distribution and detect and report deviation from it, optionally segmented by a dimension.
- SCORING_EQUATION
- APL function that exports a trained model as a portable scoring formula.
Sources
- SAP HANA Automated Predictive Library — What is SAP HANA Automated Predictive Library? (accessed 2026-09-25)
- SAP HANA Automated Predictive Library — crawler-rendered doc index (What's New, Installation, Developer Guide), version 2219, fetched 2026-09-25
- SAP HANA Automated Predictive Library Developer Guide — full function reference table of contents (fetched 2026-09-25)
- SAP-samples/hana-ml-samples — APL-SQL sample directory (Monthly/Daily Forecast, Classification, Regression, Data Drift) — GitHub (SAP), fetched 2026-09-25
- SAP-samples/hana-ml-samples — 31_Classification-Learn_and_Report.sql (APL/ModelType, APL/VariableAutoSelection) — GitHub (SAP), fetched 2026-09-25
- SAP Analytics Cloud Help — Q&A: Smart Predict with Live SAP HANA Data (APL dependency for live connectivity) — accessed 2026-09-25
Full card available to members. What the full card adds: the full decision framework · the common pitfalls and their fix · the cheat sheet · the code blocks · the facts worth quoting.