Check Table Information

Table Exists

table_check = hc.check_table_exists("table_name", "database_name")

Result:

This method will return True if table exists. Otherwise, False will be returned. If the error pops up when checking, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to be checkedYes
database_name (str)Database where the table is createdNo, defaults to "default" database
Table 60 Check if Table Exists (Python API)

Get Table Details

table_info = hc.get_table_info("table_name", "database_name")

Result:

This method will return a Dictionary containing table details. If the error pops up when obtaining information, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to be obtained with detailsYes
database_name (str)Database where the table is createdNo, defaults to "default" database
Table 61 Get Table Details (Python API)

Get Table Schema

table_schema = hc.get_table_schema("table_name", "database_name")

Result:

This method will return a Dictionary containing table schema. If table does not exist or it does not have schema, None will be returned.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to get schemaYes
database_name (str)Database where the table is createdNo, defaults to "default" database

Table 62 Get Table Schema (Python API)

Get Table Vector Index

table_indexes = hc.get_table_indexes("table_name", "database_name")

Result:

This method will return a Dictionary containing table Embedding Index. If table does not exist or it does not have Embedding Index, None will be returned.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to get Embedding IndexYes
database_name (str)Database where the table is createdNo, defaults to "default" database

Table 63 Get Table Vector Index (Python API)

List Table

tables = hc.list_tables("database_name", pattern = "*")

Result:

This method will return a Dictionary containing all tables that match the specified pattern. If the error pops up when obtaining information, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
database_name (str)Database where the table is createdNo, defaults to "default" database
pattern (str)Pattern to be specified to match tablesNo, defaults to *
ignore_aliases (bool)Whether to ignore table aliasNo, defaults to True

Table 64 List Table (Python API)

List Shard

shards = hc.list_shards("table_name", "database_name")

Result:

This method will return a Dictionary containing all shards of the specified table. If the error pops up when obtaining information, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
table_name (str)Table to list shards, if set to None, all shards of all tables will be listedYes
database_name (str)Database where the table is createdNo, defaults to "default" database

Table 65 List Shard (Python API)