08-01-2014 4:22 PM
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.
08-01-2014 4:32 PM
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
08-03-2014 8:38 PM
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 ?
08-04-2014 6:54 AM
08-04-2014 7:25 AM
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
08-04-2014 8:41 AM
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.
08-04-2014 9:00 AM
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
08-04-2014 1:12 PM
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 ??
08-04-2014 3:03 PM
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