on 09-17-2014 5:27 AM
Hi Experts,
Could you please let us know if there is a way we can set the LOCALE of the user logging into HANA Studio through SQL?
We are able to set by right clicking the System --> Properties --> Additional Properties, but we will like to achieve this through SQL.
We tried to Set Session 'LOCALE' = 'EN' and Update value in m_session_context table with no success,
Thanks and Regards,
Ram
The LOCALE variable can be set either via the connection parameter or via the user parameter setting:
ALTER USER <user_name> SET PARAMETER LOCALE ='EN'
It's all in the documentation! Open SAP HANA studio, press F1, search for ALTER USER... there you go.
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
Sorry for the delay!
We're able to change User's LOCALE parameter as you had suggested.
But, when we tried running a Analytical View with Text join in the same SQL console (or with a new console), Text join still refers the old LOCALE information that is in SYSTEM --> PROPERTIES --> ADDITIONAL PROPERTIES.
Accessing the view through XSODATA as well as XS service too has the same issue.
USER_PARAMETERS table however shows new LOCALE details.
SQL Tried:
ALTER USER <<username>> SET PARAMETER LOCALE ='DE';
ALTER USER <<username>> SET PARAMETER LOCALE_SAP ='D';
Please do suggest us here!
Thanks and Regards,
Ram
Well the user parameters are used when no other setting is provided.
With the HANA Studio you likely have a pre-defined language logon parameter (comes automatically).
BTW: you don't set LOCALE_SAP. It will be automatically derived when LOCALE is set.
Otherwise you would have to keep the mapping rules LOCALE <=> LOCALE_SAP in your application logic - and it really doesn't belong there.
- Lars
Thanks Lars,
This scenario prompts us a question on whether,
Is it okay to go with a TEXT join for the Analytical/Calculation views in case If we are to consume them in any of the reporting tool/XS based UI app as the 'User Id' we use to connect Reporting Tool (Design Studio) or BIP (Olap Connections) with HANA will have a 'LOCALE' defined.
In case if User's Hana Studio LOCALE is set as 'E' where as data we have in DB has descriptions only for 'D', then our report shows Descriptions as Null.
Is there a way we can set LOCALE of the ID (user Id) that connects to HANA Db from a reporting tool keeping the TEXT joins?
We were able to achieve with a workaround solution of having filter on SPRAS column, but just checking if Hana has this funcationality.
Thanks and Regards,
Ram
Hi Ram
your problem is not that you cannot set the the session locale settings after the logon, but rather how the language lookup should handle non-matches and what fall-back output should be provided.
Currently SAP HANAs text join does not provide a fall-back language for incomplete data sets.
If the data is not maintained in the language that was set, then the result will be NULL.
Using a manual filter on the language denoting column is fine - really, the text join is a simplification for the modeler. Technically it doesn't do anything else then a normal join.
- Lars
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.