Alias

Create Alias

alias_created = hc.create_alias("table_name", "alias_name", "database_name")  

Result:

This method will a Boolean value to represent whether this operation is successful. If the error pops up when creating alias, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to create aliasYes
alias_name (str)Alias to be createdYes
database_name (str)Database where the table is createdNo, defaults to "default" database
Table 68 Create Table Alias (Python API)

Delete Alias

alias_deleted = hc.delete_alias("alias_name", "database_name")

Result:

This method returns a Boolean value to represent whether this operation is successful. If the error pops up when deleting alias, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
alias_name (str)Alias to be deletedYes
database_name (str)Database where the table containing this alias is createdNo, defaults to "default" database
Table 69 Delete Table Alias (Python API)