decisionengine.framework.dataspace.datasources package
Subpackages
- decisionengine.framework.dataspace.datasources.sqlalchemy_ds package
- Submodules
- decisionengine.framework.dataspace.datasources.sqlalchemy_ds.datasource_api module
SQLAlchemyDSSQLAlchemyDS._abc_implSQLAlchemyDS.close()SQLAlchemyDS.connect()SQLAlchemyDS.create_tables()SQLAlchemyDS.delete_data_older_than()SQLAlchemyDS.duplicate_datablock()SQLAlchemyDS.get_datablock()SQLAlchemyDS.get_dataproduct()SQLAlchemyDS.get_dataproducts()SQLAlchemyDS.get_header()SQLAlchemyDS.get_last_generation_id()SQLAlchemyDS.get_metadata()SQLAlchemyDS.get_schema()SQLAlchemyDS.get_taskmanager()SQLAlchemyDS.get_taskmanagers()SQLAlchemyDS.insert()SQLAlchemyDS.reset_connections()SQLAlchemyDS.store_taskmanager()SQLAlchemyDS.update()
- decisionengine.framework.dataspace.datasources.sqlalchemy_ds.db_schema module
- decisionengine.framework.dataspace.datasources.sqlalchemy_ds.utils module
- Module contents
SQLAlchemyDSSQLAlchemyDS._abc_implSQLAlchemyDS.close()SQLAlchemyDS.connect()SQLAlchemyDS.create_tables()SQLAlchemyDS.delete_data_older_than()SQLAlchemyDS.duplicate_datablock()SQLAlchemyDS.get_datablock()SQLAlchemyDS.get_dataproduct()SQLAlchemyDS.get_dataproducts()SQLAlchemyDS.get_header()SQLAlchemyDS.get_last_generation_id()SQLAlchemyDS.get_metadata()SQLAlchemyDS.get_schema()SQLAlchemyDS.get_taskmanager()SQLAlchemyDS.get_taskmanagers()SQLAlchemyDS.insert()SQLAlchemyDS.reset_connections()SQLAlchemyDS.store_taskmanager()SQLAlchemyDS.update()
- decisionengine.framework.dataspace.datasources.tests package
- Submodules
- decisionengine.framework.dataspace.datasources.tests.fixtures module
- decisionengine.framework.dataspace.datasources.tests.test_datasource_api module
test_create_tables()test_delete_data_older_than_arg()test_duplicate_datablock()test_get_datablock()test_get_dataproduct()test_get_dataproduct_not_exist()test_get_dataproducts()test_get_dataproducts_not_exist()test_get_header()test_get_header_not_exist()test_get_last_generation_id()test_get_last_generation_id_not_exist()test_get_metadata()test_get_metadata_not_exist()test_get_taskmanager_exists()test_get_taskmanager_not_exists()test_get_taskmanagers()test_get_taskmanagers_not_exist()test_has_config()test_insert()test_reset_connections()test_store_taskmanager()test_update()test_update_bad()
- Module contents
Submodules
decisionengine.framework.dataspace.datasources.null module
- class decisionengine.framework.dataspace.datasources.null.NullDataSource(config_dict)[source]
Bases:
DataSourceImplementation of data source ABC that does nothing
- _abc_impl = <_abc._abc_data object>
- delete_data_older_than(days)[source]
Delete data older that interval :type days:
long:arg days: remove data older than interval
- duplicate_datablock(taskmanager_id, generation_id, new_generation_id)[source]
For the given taskmanager_id, make a copy of the datablock with given generation_id, set the generation_id for the datablock copy
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datanew_generation_id (
int) – generation_id of the new datablock created
- get_datablock(taskmanager_id, generation_id)[source]
Return the entire datablock from the dataproduct table for the given taskmanager_id, generation_id
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the data
- get_dataproduct(taskmanager_id, generation_id, key)[source]
Return the data from the dataproduct table for the given taskmanager_id, generation_id, key
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datakey (
string) – key for the value
- get_dataproducts(taskmanager_id, key=None)[source]
Return list of all data products associated with with taskmanager_id
- Parameters:
key (
string) – data product key
- get_header(taskmanager_id, generation_id, key)[source]
Return the header from the header table for the given taskmanager_id, generation_id, key
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datakey (
string) – key for the value
- get_last_generation_id(taskmanager_name, taskmanager_id=None)[source]
Return last generation id for current task manager or taskmanager w/ task_manager_id.
- Parameters:
taskmanager_name (
string) – task manager nametaskmanager_id (
string) – task manager id
- get_metadata(taskmanager_id, generation_id, key)[source]
Return the metadata from the metadata table for the given taskmanager_id, generation_id, key
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datakey (
string) – key for the value
- get_schema(table=None)[source]
Given the table name return it’s schema
- Parameters:
table (
string) – Name of the table
- get_taskmanager(taskmanager_name, taskmanager_id=None)[source]
Retrieve TaskManager :type taskmanager_name:
string:arg taskmanager_name: name of taskmanager to retrieve :type taskmanager_id:string:arg taskmanager_id: id of taskmanager to retrieve
- get_taskmanagers(taskmanager_name=None, start_time=None, end_time=None)[source]
Retrieve TaskManagers :type taskmanager_name:
string:arg taskmanager_name: name of taskmanager to retrieve :type taskmanager_id:string:arg taskmanager_id: id of taskmanager to retrieve
- insert(taskmanager_id, generation_id, key, value, header, metadata)[source]
Insert data into respective tables for the given taskmanager_id, generation_id, key
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datakey (
string) – key for the valuevalue (
object) – Value can be an object or dictheader (
Header) – Header for the valueheader – Metadata for the value
- store_taskmanager(name, taskmanager_id, datestamp=None)[source]
Store TaskManager :type taskmanager_name:
string:arg taskmanager_name: name of taskmanager to retrieve :type taskmanager_id:string:arg taskmanager_id: id of taskmanager to retrieve :type datestamp:datetime:arg datestamp: datetime of created object, defaults to ‘now’
- update(taskmanager_id, generation_id, key, value, header, metadata)[source]
Update the data in respective tables for the given taskmanager_id, generation_id, key
- Parameters:
taskmanager_id (
string) – taskmanager_id for generation to be retrievedgeneration_id (
int) – generation_id of the datakey (
string) – key for the valuevalue (
object) – Value can be an object or dictheader (
Header) – Header for the valueheader – Metadata for the value