Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sort in Analytical view

jitendra_it
Active Contributor
0 Kudos

Hello Folks,

We have got an analytic view with some date columns.

I want to sort those columns. I am not able to find any property related to Sort in Data Foundation or Logical join.


Could you please suggest a way to sort apart from SQL script.

8 REPLIES 8

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

how would you like to consume the analytical view?

- Using an external view in openSQL you can use an "ORDER BY"

- Same holds for native SQL, just use SELECT <columns> from <AN_VIEW> ORDER BY <field>

Cheers,

  Jasmin

0 Kudos

Hello Jasmin,

Thanks.

We are planning to go with Native SQL.

So apart from Order BY in Select query , don't we have other options while designing view in HANA Studio ?.

Can you suggest what would be better in terms of performance Native SQL approach Or External view ?

0 Kudos

Hi Jitendra,
not to my knowledge but you might also ask the or the BW colleagues () if there is such an option.

Cheers,

  Jasmin

0 Kudos

Hi there!

There is no "sort the output" option in analytical views or in any information view for that matter.

Just as with every other object in the database that you can query, you have to provide the required sort order in the ORDER BY clause of your SELECT command.

Note: Information models are not reports, but can be used as data sources for reports!

- Lars

0 Kudos

Hello Lars,

Thanks for your inputs.

Could you tell me which is better approach for accessing HANA views 1. Open SQL via External Views OR 2.Native SQL ( ADBC ) ? , In performance terms.

0 Kudos

Hi Jitendra,
concerning performance both options are fine. Open SQL might be a bit faster, however, External Views do not support input parameters and can only be created/maintained if HANA is your primary database (yet, consumption of the external view is possible via a secondary connection).
So the question which one to use is rather a question on how the view is constructed and in which scenario you'd like to use it.

Regards,

  Jasmin

0 Kudos

Hello Jasmin,

Thanks for inputs.

HANA is Primary db here. The views are created without any input parameters. So I think External view will be better option.


I have created a external view for Analytic one but I am not able to see its contents in SE16 while I can see its definition in SE11.


So my query is can we also create external view for analytic and calculation view ??

0 Kudos

Hi Jitendra,
you can create external views for any HANA view, i.e. attribute views, analytical views, and calculation views.

The display of external views via SE16 could lead to "GROUP BY" issues, therefore the colleagues have restricted the display of external views (on analytical views) in SE16. Yet, I agree, the error message could be enhanced to give you an information why that is the case .

Cheers,

  Jasmin