table_push_manager.py
        
TablePushManager        
¶
    Table Push Manager object to interact with Celonis Event Collection API.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| pool_table_name | str | Name of Table. | required | 
| if_exists | str | 
 | required | 
| primary_keys | List[str] | List of Table primary keys. | None | 
| column_config | List[Dict] | Can be used to specify column types and string field length.with columnTypeone of [INTEGER,DATE,TIME,DATETIME,FLOAT,BOOLEAN,STRING]. | None | 
| alias | str | Alias of the Table. | None | 
| foreign_keys | List[Tuple[str, str]] | Foreign keys to connect  | None | 
| source_table | str | If given, the join created will be  | None | 
| target_table | str | If given, the join created will be  | None | 
| partial_reload_on_execution | bool | If True, Datamodel will be partially reloaded after each push. | False | 
get_existing_table_status(self, datamodel)
¶
    Checks the Status of an existing Table in Event Collection."
Status Dictionary:
{
    "pool_table_exists": True,
    "dm_table_exists": True,
    "foreign_keys": [("KEY","KEY"),...],
    "table_cols": ["KEY","ACTIVITY_EN",..]
}
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| datamodel | Datamodel | Datamodel the the table is supposed to be added to. | required | 
Returns:
| Type | Description | 
|---|---|
| Dict | Status Dictionary. | 
create_table(self, df, datamodel, partial_reload=False)
¶
    Creates the Table by pushing it to the Pool, adding it to the Datamodel and creating the Foreign Key.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| df | DataFrame | Table to be pushed. | required | 
| datamodel | Datamodel | Target Datamodel | required | 
| partial_reload | bool | If True Datamodel is partially reloaded after Table is added. | False | 
Returns:
| Type | Description | 
|---|---|
| DatamodelTable | The newly created Datamodel Table. | 
push_data_into_table(self, df, datamodel)
¶
    Executes the data push manager with the given df.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| df | pd.DataFrame | required | |
| datamodel | DataModel | required | 
Returns:
| Type | Description | 
|---|---|
| str | "DONE" |