{"ref":"artifact:sap-samples-analytics-cloud-rpt15-prediction-demo","page":"/artifacts/sap-samples-analytics-cloud-rpt15-prediction-demo","json":"/artifacts/sap-samples-analytics-cloud-rpt15-prediction-demo.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"sap-samples-analytics-cloud-rpt15-prediction-demo","name":"analytics-cloud-rpt15-prediction-demo","artifact_type":"sample","ecosystem":"btp","use_as":"reference","domain":"ai-and-agents","origin_ring":"sap-official","description":{"one_line":"A FastAPI backend that triggers SAP-RPT-1.5 payment-delay predictions from an [SAP Analytics Cloud](artifact:btp-analytics-cloud) Multi Action and writes the results back to HANA.","short":"FastAPI backend for SAP-RPT-1.5 predictions from SAP Analytics Cloud","what_it_solves":"Calling a predictive model from [SAP Analytics Cloud](artifact:btp-analytics-cloud) needs an intermediary that SAC's asynchronous External API step can poll, and this project is that intermediary: a FastAPI service on the [Cloud Foundry runtime](artifact:btp-cloud-foundry-runtime) that reads every row of a `V_PAYMENT_DELAY_PREDICTION` view in [SAP Datasphere](artifact:btp-datasphere) or [SAP HANA Cloud](artifact:btp-hana-cloud), sends the rows whose `Days_Late` is null to an RPT-1.5 deployment on [SAP AI Core](artifact:btp-ai-core) with the scored rows alongside them as context, and upserts the predicted value and confidence interval into a staging table for the SAC story to read. A Multi Action button starts the job and polls a second endpoint until it reports done. It answers one scenario, payment-delay prediction, and needs its own SAP AI Core, Datasphere or HANA Cloud and Cloud Foundry setup already in place."},"links":{"repo":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo"},"identity":{"license":"Apache-2.0"},"source_available":true,"demonstrates":["capability:predictive-models"],"requires":[{"ref":"artifact:btp-ai-core","for":"the RPT-1.5 Large deployment the service calls for every prediction","requirement":"required","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, Requirements","checked":"2026-10-19","quote":"- **SAP AI Core** with an RPT-1.5 Large deployment"}]},{"ref":"artifact:btp-datasphere","for":"where the V_PAYMENT_DELAY_PREDICTION view and the staging table live, when the data sits in Datasphere","requirement":"conditional","condition":"the requirement names SAP Datasphere or SAP HANA Cloud; this is the Datasphere half of that choice","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, Requirements","checked":"2026-10-19","quote":"- **SAP Datasphere / SAP HANA Cloud** with a `V_PAYMENT_DELAY_PREDICTION` view"}]},{"ref":"artifact:btp-hana-cloud","for":"where the V_PAYMENT_DELAY_PREDICTION view and the staging table live, when the data sits in HANA Cloud","requirement":"conditional","condition":"the requirement names SAP Datasphere or SAP HANA Cloud; this is the HANA Cloud half of that choice","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, Requirements","checked":"2026-10-19","quote":"- **SAP Datasphere / SAP HANA Cloud** with a `V_PAYMENT_DELAY_PREDICTION` view"}]},{"ref":"artifact:btp-cloud-foundry-runtime","for":"the space the FastAPI service is deployed to; the README gives no other deployment target","requirement":"required","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, Requirements","checked":"2026-10-19","quote":"- **Cloud Foundry** space (SAP BTP) for deployment"}]}],"connects":[{"ref":"artifact:btp-ai-core","kind":"data","direction":"outbound","for":"sends the rows to predict with the already-scored rows as context, and takes the predicted value and confidence interval back","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README","checked":"2026-10-19","quote":"RPT-1.5 is deployed in **SAP AI Core**, the data lives in **SAP Datasphere**, and this **FastAPI** service — deployed to **Cloud Foundry** — wraps the prediction call."},{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, data processing","checked":"2026-10-19","quote":"The job reads every row from the `V_PAYMENT_DELAY_PREDICTION` view. Rows with a `NULL` `Days_Late` are marked `[PREDICT]`; all other rows are sent as **context** so RPT-1.5 can make accurate in-context predictions."}]},{"ref":"artifact:btp-datasphere","kind":"data","direction":"outbound","condition":"the data sits in SAP Datasphere; the README's requirement names SAP Datasphere or SAP HANA Cloud","for":"reads every row of the V_PAYMENT_DELAY_PREDICTION view and upserts the predictions into a staging table","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README","checked":"2026-10-19","quote":"RPT-1.5 is deployed in **SAP AI Core**, the data lives in **SAP Datasphere**, and this **FastAPI** service — deployed to **Cloud Foundry** — wraps the prediction call."},{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, results","checked":"2026-10-19","quote":"Predictions (value + confidence interval) are upserted into a staging table."}]},{"ref":"artifact:btp-analytics-cloud","kind":"data","direction":"inbound","for":"SAC opens the connection: a Multi Action starts the job, polls it, and brings the predicted values into the story","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README","checked":"2026-10-19","quote":"Multi Action button triggers the prediction, polls for the result, and writes the predicted values back so they show up in a story."}]}],"interfaces":[{"key":"predict","name":"POST /predict","kind":"api","protocol":"http","direction":"in","for":"start a prediction job and take back the job id to poll","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, API","checked":"2026-10-19","quote":"Start a prediction job. Returns `202` with `jobId` and a `Location` header"},{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, API","checked":"2026-10-19","quote":"All endpoints require **HTTP Basic auth** (`API_USERNAME` / `API_PASSWORD`)."}]},{"key":"predict-status","name":"GET /predict/{job_id}","kind":"api","protocol":"http","direction":"in","for":"poll a job until it reports done, with the number of rows predicted","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, API","checked":"2026-10-19","quote":"Poll job status → `running` / `done` / `failed`, plus `predicted` count"},{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README, API","checked":"2026-10-19","quote":"All endpoints require **HTTP Basic auth** (`API_USERNAME` / `API_PASSWORD`)."}]}],"type_properties":{"form":{"value":"reference-application","sources":[{"url":"https://github.com/SAP-samples/analytics-cloud-rpt15-prediction-demo","title":"SAP-samples/analytics-cloud-rpt15-prediction-demo — README","checked":"2026-10-19","quote":"RPT-1.5 is deployed in **SAP AI Core**, the data lives in **SAP Datasphere**, and this **FastAPI** service — deployed to **Cloud Foundry** — wraps the prediction call."}]}},"maintainers":["actor:sap-samples"],"drafted_with_ai":true,"provenance":{"discovered_via":[{"source":"source:curator"}],"first_seen":"2026-09-13"},"contributors":["actor:jonas-200"]},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"unknown","evidence":"no release data"},{"label":"Continuity","tier":"good","evidence":"3 contributors, org-owned"},{"label":"Repository","tier":"good","evidence":"pushed 2026-08, not archived"}],"compatibility":[{"label":"Declared for","tier":"unknown","evidence":"no BTP release lines in the atlas"},{"label":"Survived majors","tier":"unknown","evidence":"no BTP release lines in the atlas"},{"label":"Maintainer's CI","tier":"fair","evidence":"no CI configured"}],"practice":[{"label":"Tests","tier":"fair","evidence":"none found in the tree"},{"label":"Docs","tier":"good","evidence":"README 5 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":null,"unit":"installs/week"},{"value":0,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-25","npm":"not published under this name","stars":0,"forks":1,"open_issues":0,"archived":false,"pushed_at":"2026-08-07","license_spdx":"Apache-2.0","org_owned":true,"default_branch":"main","created_at":"2026-08-06T06:40:56Z","open_prs":0,"tree_truncated":false,"test_files":0,"workflows":0,"other_ci":false,"readme_bytes":5128,"docs_files":0,"changelog":false,"license_file":true,"dts_files":0,"first_commit":"2026-08-06","last_commit":"2026-08-06","commits":5,"contributors":3,"readme_path":"README.md","readme_sha":"a7a92713f4addf453c4fe14bf0680e447489d8b8","repo_read":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:sap-samples","name":"SAP Samples","json":"/actors/sap-samples.json"}],"contributors":[{"ref":"actor:jonas-200","name":"jonas-200","json":"/actors/jonas-200.json"}],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}