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:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table to be checked | Yes |
database_name (str) | Database where the table is created | No, defaults to "default" database |
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:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table to be obtained with details | Yes |
database_name (str) | Database where the table is created | No, defaults to "default" database |
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:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table to get schema | Yes |
database_name (str) | Database where the table is created | No, 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:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table to get Embedding Index | Yes |
database_name (str) | Database where the table is created | No, 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:
Parameters | Description | Required |
---|---|---|
database_name (str) | Database where the table is created | No, defaults to "default" database |
pattern (str) | Pattern to be specified to match tables | No, defaults to * |
ignore_aliases (bool) | Whether to ignore table alias | No, 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:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table to list shards, if set to None, all shards of all tables will be listed | Yes |
database_name (str) | Database where the table is created | No, defaults to "default" database |
Table 65 List Shard (Python API)