foreign_key
Module to interact with foreign keys.
This module contains class to interact with a foreign key in EMS data integration.
Typical usage example:
```python
foreign_key = data_model.get_foreign_key(foreign_key_id)
foreign_key.name = "NEW_NAME"
foreign_key.update()
foreign_key.reload()
foreign_key.delete()
```
ForeignKey ¶
Bases: DataModelForeignKeyTransport
Foreign key object to interact with foreign key specific data integration endpoints.
from_transport
classmethod
¶
Creates high-level foreign key object from given DataModelForeignKeyTransport.
Parameters:
-
client
(Client
) –Client to use to make API calls for given foreign key.
-
data_pool_id
(str
) –Id of data pool where table is located
-
foreign_key_transport
(DataModelForeignKeyTransport
) –DataModelForeignKeyTransport object containing properties of foreign key.
Returns:
-
ForeignKey
–A ForeignKey object with properties from transport and given client.
update ¶
Pushes local changes of foreign key to EMS and updates properties with response from EMS.