Datasets

The internal representation of a CIM model is contained in the dataset object. A dataset wraps the functionality of a SQLAlchemy-session object for database operations (query, add, commit and so on).

Dataset objects are created by parsing or loading a CIM model, or by creating an empty dataset.

cimpyorm.create_empty_dataset(version='16', backend=<class 'cimpyorm.backends.SQLite'>, profile_whitelist=None)[source]

Create an empty dataset to be filled by instantiation of schema-objects.

Parameters
  • version – The CIM version to be used.

  • backend – The backend to be used.

  • profile_whitelist – A list of allowed CIM-profiles. Profiles not contained in this list are not considered for schema generation. If empty or None, all schema elements defined by the CIM schema are generated.

Returns

An empty dataset/session object and the model namespace associated with the CIM schema.

Example Datasets

CIMPyORM comes preloaded with the ENTSO-E FullGrid and MiniGrid datasets.

They can be accessed through the datasets module:

from cimpyorm import datasets
db_session, model = datasets.ENTSOE_FullGrid()
db_session, model = datasets.ENTSOE_MiniBB()    # The Bus-Branch Model version
db_session, model = datasets.ENTSOE_MiniNB()    # The Node-Breaker Model version