| get_full_catalog(workspace_id: str, inject_valid_objects_func: bool) | Retrieves catalog for a workspace. Catalog contains all data sets and metrics defined in that workspace. |
| get_attributes_catalog(workspace_id: str, include: list[str], rsql_filter: str) | Retrieve all attributes in a given workspace. |
| get_labels_catalog(workspace_id: str) | Retrieve all labels in a given workspace. |
| get_metrics_catalog(workspace_id: str) | Retrieve all Metrics in a given workspace. |
| get_facts_catalog(workspace_id: str) | Retrieve all facts in a given workspace. |
| get_aggregated_facts_catalog(workspace_id: str) | Retrieve all aggregated facts in a given workspace. |
| get_dependent_entities_graph(workspace_id: str) | There are dependencies among all catalog objects, the chain is the following:
`fact/attribute/label → dataset → metric → visualization → dashboard`
Some steps can be skipped, e.g. `fact → visualization`
We do not support `table → dataset` dependency yet. |
| get_dependent_entities_graph_from_entry_points(workspace_id: str, dependent_entities_request: CatalogDependentEntitiesRequest) | Extends get_dependent_entities_graph with the entry point from which the graph is created. |
| get_declarative_ldm(workspace_id: str) | Retrieve a logical model layout. On CatalogDeclarativeModel user can call
``modify_mapped_data_source(data_source_mapping: dict)`` method,
which substitutes data source id in datasets. |
| put_declarative_ldm(workspace_id: str, ldm: CatalogDeclarativeModel, validator: Optional[DataSourceValidator], standalone_copy: bool) | Set declarative logical data model for a given workspace. |
| store_declarative_ldm(workspace_id: str, layout_root_path: Path) | Store declarative logical data model for a given workspace in directory hierarchy.
This method ties the LDM to the workspace and organization, thus it is recommended
for backups. If you want to move LDM between workspaces or organizations, use store_ldm_to_disk. |
| load_declarative_ldm(workspace_id: str, layout_root_path: Path) | Load declarative Logical Data Model, which was stored using store_declarative_workspaces |
| load_and_put_declarative_ldm(workspace_id: str, layout_root_path: Path, validator: Optional[DataSourceValidator], standalone_copy: bool) | This method combines load_declarative_ldm and put_declarative_ldm
methods to load and set layouts stored using store_declarative_ldm. |
| store_ldm_to_disk(workspace_id: str, path: Path, sort: bool) | Store declarative logical data model for a given workspace in directory hierarchy.
This method does not tie the LDM to the workspace and organization, thus it is recommended
for migration between organizations. If you want to backup LDM use store_declarative_ldm. |
| load_ldm_from_disk(path: Path) | Loads the Logical Data Model, which was stored using store_ldm_to_disk. |
| get_declarative_analytics_model(workspace_id: str, exclude: Optional[list[str]]) | Retrieves declarative analytics model. The model is tied to the workspace and organization. |
| put_declarative_analytics_model(workspace_id: str, analytics_model: CatalogDeclarativeAnalytics) | Sets the declarative analytics model for a given workspace. |
| store_declarative_analytics_model(workspace_id: str, layout_root_path: Path) | Store declarative analytics model for a given workspace in directory hierarchy.
This method ties the declarative analytics model to the workspace and organization, thus it is
recommended for backups. If you want to move declarative analytics model between workspaces or
organizations, use store_analytics_model_to_disk. |
| load_declarative_analytics_model(workspace_id: str, layout_root_path: Path) | Loads the declarative analytics model, which was stored using store_declarative_analytics_model. |
| load_and_put_declarative_analytics_model(workspace_id: str, layout_root_path: Path) | This method combines load_declarative_analytics_model and put_analytics_model methods
to load and set layouts stored using store_declarative_analytics_model. |
| store_analytics_model_to_disk(workspace_id: str, path: Path, exclude: Optional[list[str]], sort: bool) | Store analytics model for a given workspace in directory hierarchy.This method does not tie the declarative
analytics model to the workspace and organization, thus it is recommended for migration between workspaces.
If you want to migrate analytics model between workspaces, use store_analytics_model_to_disk. |
| load_analytics_model_from_disk(path: Path) | Loads the analytics model, which was stored using store_analytics_model_to_disk. |
| layout_workspace_folder(workspace_id: str, layout_root_path: Path) | Ties the LDM or Analytics Model to the Organization and workspaces in the store methods. |
| compute_valid_objects(workspace_id: str, ctx: ValidObjectsInputType) | Returns attributes, facts, and metrics which are valid to add to a context that already
contains some entities from the semantic model. The entities are typically used to compute analytics and
come from the execution definition. You may, however, specify the entities through different layers of
convenience. |
| get_label_elements(workspace_id: str, label_id: str, depends_on: Optional[list[DependsOnItem]], validate_by: Optional[list[CatalogValidateByItem]], exact_filter: Optional[list[str]], filter_by: Optional[CatalogFilterBy], pattern_filter: Optional[str], complement_filter: Optional[bool], sort_order: Optional[Literal['ASC', 'DESC']], offset: Optional[int], limit: Optional[int]) | Get existing values for a label.
Under-the-hood, it basically executes SELECT DISTINCT from corresponding table.
Values are automatically sorted lexicographically. |