Symptom
Running the preview on a SQL view having ORDER BY DESC or ASC in the sql does not change the result order
Environment
- Product: SAP Datasphere
Reproducing the Issue
- Create a SQL view in Data Builder that selects a column and includes an ORDER BY clause on that column (for example, ORDER BY DESC and ORDER BY ASC).
- Open the Data Preview for the SQL view and observe that the displayed rows are not sorted according to the ORDER BY clause.
Cause
The Data Builder preview ignores ORDER BY clauses in SQL views by design; ORDER BY is applied when the view is consumed by applications or clients, not in the preview.
Resolution
- Verify the sort behavior by consuming the SQL view from an analytics client or SQL tool; the ORDER BY clause will be applied when the view is executed by consumers.
- If you need a sorted display during preview, use the preview’s UI sort controls rather than relying on the ORDER BY clause in the SQL view.
- If sorted preview based on SQL ORDER BY is required as a product capability, consider submitting an enhancement request via the official channel.
See Also
- Refer to: Sort Data (Datasphere Documentation)
- Refer to: SAP Influence Portal for Datasphere
Keywords
datasphere, data builder, sql view, data preview, order by ignored, sorting not applied, result order unchanged, asc, desc, view modeling, design limitation, preview sort, analytical consumption, sql order by, feature request , KBA , DS-DI-DM , Data Maintenance , DS-MD-VIW , Views , Problem
Product
SAP Datasphere all versions
SAP Knowledge Base Article - Public