This topic describes the syntax of the HG_USER_DISPLAY_NAME_TO ID function in Hologres.


hg_user_display_name_to_id: maps an Alibaba Cloud account or a Resource Access Management (RAM) user to the corresponding username in Hologres.


SELECT hg_user_diplay_name_to_id (aliyun_id)


  • aliyun_id: an Alibaba Cloud account in the format of, or a RAM user in the format of RAM$mainaccount:subuser or RAM$public.
  • The return value is the name of the corresponding Hologres user, such as 13532241323xxx for an Alibaba Cloud account or p4_23402030200xxx for a RAM user.


SELECT hg_user_display_name_to_id ('RAM$main:subuser');