GNNTable.remove_column()
Remove an existing column from the GNN table. If the column is used as a candidate key, foreign key, or time column, it will be removed from those roles as well.
Parameters
Section titled “Parameters”| Name | Type | Description | Optional |
|---|---|---|---|
col_name | str | The name of the column to remove from the GNN table. | No |
Returns
Section titled “Returns”Raises ValueError if the column does not exist in the GNN table.
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")])
# Do not use this column as an input feature for the GNNTabletable_with_ckey.remove_column(col_name="some_column_name")