GNNTable.unset_candidate_key()
Unset an existing column as a candidate key in the GNN table. This will remove the column from its role as candidate key.
Parameters
Section titled “Parameters”| Name | Type | Description | Optional |
|---|---|---|---|
col_name | CandidateKey | The candidate key definition to unset. | No |
Returns
Section titled “Returns”Raises ValueError if the column does not exist in the GNN table or KeyError if the column is not currently set as a candidate key.
Example
Section titled “Example”from relationalai_gnns import GNNTable, CandidateKey
table_with_ckey = GNNTable( connector=connector, name="TableWithCKey", source="DATABASE.SCHEMA.TABLE_WITH_CKEY", type="node", candidate_keys=[CandidateKey(column_name="Id")])
table_with_ckey.unset_candidate_key(col_name="Id")