Skip to content

data_model_table

Module to interact with data model tables.

This module contains class to interact with a data model tables in EMS data integration.

Typical usage example:

```python
data_model_table = data_model.add_table("TEST_TABLE", alias="TEST_TABLE_ALIAS")
data_model_table.alias = "NEW_ALIAS"
data_model_table.update()
data_model_table.reload()
data_model_table.delete()
```

DataModelTable

Bases: DataModelTableTransport

Data model table object to interact with data model table specific data integration endpoints.

use_direct_storage class-attribute instance-attribute

use_direct_storage = Field(alias='useDirectStorage')

primary_keys class-attribute instance-attribute

primary_keys = Field(alias='primaryKeys')

alias_or_name class-attribute instance-attribute

alias_or_name = Field(alias='aliasOrName')

client class-attribute instance-attribute

client = Field(..., exclude=True)

id instance-attribute

id

Id of data model table.

data_model_id instance-attribute

data_model_id

Id of data model where data model table is located.

data_pool_id instance-attribute

data_pool_id

Id of data pool where data model table is located.

data_source_id instance-attribute

data_source_id

Id of data source where data model table is located.

name instance-attribute

name

Name of data model table.

alias instance-attribute

alias

Alias of data model table.

columns instance-attribute

columns

Columns of data model table.

from_transport classmethod

from_transport(
    client, data_pool_id, data_model_table_transport
)

Creates high-level data model table object from given DataModelTableTransport.

Parameters:

  • client (Client) –

    Client to use to make API calls for given data model table.

  • data_pool_id (str) –

    Id of data pool where table is located

  • data_model_table_transport (DataModelTableTransport) –

    DataModelTableTransport object containing properties of data model table.

Returns:

  • DataModelTable

    A DataModelTableTransport object with properties from transport and given client.

update

update()

Pushes local changes of data model table to EMS and updates properties with response from EMS.

sync

sync()

Syncs data model table properties with EMS.

delete

delete()

Deletes data model table.

get_columns

get_columns()

Gets data model table columns of given table.

Returns: