Undocumented
Class Method | get |
Get database name for given path |
Class Method | identify |
Identify the given benchmark by its GBD hash |
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | copy |
Copies feature with given name |
Method | create |
Creates feature with given name |
Method | delete |
Deletes feature with given name |
Method | delete |
Delete all values for given hashes |
Method | feature |
Check if feature exists in the database. |
Method | get |
Get list of contexts |
Method | get |
Get path for given database name |
Method | get |
Get list of database names |
Method | get |
Retrieve information about a specific feature |
Method | get |
Get features from the database. |
Method | query |
Query the database |
Method | rename |
Renames feature with given name |
Method | reset |
Reset feature value for given hashes |
Method | set |
Set feature value for given hashes |
Instance Variable | database |
Undocumented |
Instance Variable | verbose |
Undocumented |
Instance Variable | _stack |
Undocumented |
Identify the given benchmark by its GBD hash
Args: path (str): path to benchmark
Returns: str: GBD hash
Copies feature with given name
Args: old_name (str): old feature name new_name (str): new feature name target_db (str): name of database to copy feature to if None, default database (fist in list) is used
Returns: None
Creates feature with given name
Args: name (str): feature name default_value (str): default value for 1:1 features if None, a multi-valued (1:n) feature is created target_db (str): database name if None, default database (fist in list) is used
Returns: None
Raises: GBDException, if feature already exists in target_db
Deletes feature with given name
Args: name (str): feature name target_db (str): database name if None, default database (fist in list) is used
Returns: None
Raises: GBDException, if feature does not exist in target_db
Delete all values for given hashes
Args: hashes (list): list of hashes (=benchmark ids) to be deleted target_db (str, optional): name of target database if None, default database (first in list) is used
Raises: GBDException, if feature does not exist
Check if feature exists in the database.
Args: name (str): name of feature dbname (str): name of feature database if None, feature existence is checked for in all databases
Returns: True if feature exists in dbname or any database, False otherwise
Get features from the database.
Args: dbname (str): name of feature database if None, feature list is accumulated over all databases
Returns: list of features names
Query the database
Args: gbd_query (str): GBD query string hashes (list): list of hashes (=benchmark ids), the query is restricted to resolve (list): list of features to be resolved collapse (str): collapse function: min, max, avg, count, sum, group_concat, or none group_by (str): group results by that feature instead of hash (default) join_type (str): join type: left or inner
Returns: pandas.DataFrame: query result
Renames feature with given name
Args: old_name (str): old feature name new_name (str): new feature name target_db (str): database name if None, default database (fist in list) is used
Returns: None
Raises: GBDException, - if feature 'old_name' does not exist in target_db - if feature 'new_name' already exists in target_db
Reset feature value for given hashes
Args: feature (str): feature name values (list, optional): list of values to be reset hashes (list, optional): list of hashes (=benchmark ids) to be reset target_db (str, optional): name of target database if None, default database (first in list) is used
Raises: GBDException, if feature does not exist