This topic describes the syntax of the HG_DISPLAY_NAME_TO _ID function in Hologres.


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


SELECT hg_display_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_display_name_to_id ('RAM$main:subuser');