Symptom
Getting error when creating SQL View using window functions.
Environment
SAP Datasphere
Reproducing the Issue
- Log into SAP Datasphere
- Try to create a SQL view with SQL for example:
SELECT ProdName, Type, Sales, ROW_NUMBER() OVER (PARTITION BY ProdName ORDER BY Sales DESC) AS row_num FROM ProductSales ORDER BY ProdName, Sales DESC;
- Error when previewing data
Cause
SAP Datasphere does not support SAP HANA Cloud "window functions"
Resolution
Working sa designed. Currently, SQL window functions aren't supported in the SQL View in SAP Datasphere.
See SQL Functions Reference | SAP Help Portal
If possible, change the SQL view language to "SQLScript(Table Function)", see SAP Help Page.
Window functions can be leveraged with an additional change in syntax:
Keywords
dwc, data warehouse cloud , KBA , DS-MD-VIW , Views , Problem
Product
SAP Datasphere all versions