catalog
class atscale.catalog.catalog.Catalog
Creates an object corresponding to an AtScale catalog. References an AtScale Repo and takes a catalog ID to construct an object that houses DataModels, data sets, and any functionality pertaining to catalog maintenance.
property caption : str
Getter for the caption instance variable
- Returns: The catalog caption
- Return type: str
get_data_model
Returns the DataModel associated with this Catalog with the given name. If no name is provided and there is only one DataModel associated with this Catalog, then that one DataModel will be returned. However, if no name is given and there is more than one DataModel associated with this Catalog, then None will be returned.
- Parameters: model_name (str , optional) – the name of the DataModel to be retrieved. Defaults to None.
- Returns: a DataModel associated with this Catalog.
- Return type: DataModel
get_data_models
Returns a list of metadata dicts for each of the data models in the catalog.
- Returns: List of ‘id’:’name’ pairs of available Data Models.
- Return type: List[Dict[str,str]]
property id : str
Getter for the id instance variable
- Returns: The catalog id
- Return type: str
property name : str
Getter for the name instance variable
- Returns: The catalog name
- Return type: str
property repo
Getter for the repo instance variable
- Returns: The repo
- Return type: str
select_data_model
Prompts the user to select a DataModel that the catalog can access.
- Parameters:
- data_model_id (str , optional) – A data model id, will select the model with the matching id. If None, asks user to select from list. Defaults to None.
- name_contains (str , optional) – A string to use for string comparison to filter the found data model names. Defaults to None.
- Returns: the selected DataModel
- Return type: DataModel