utils.rc.dtos.project
Module Contents
Classes
str(object='') -> str |
|
Attributes
- utils.rc.dtos.project.logger
- class utils.rc.dtos.project.DagRunFrequency
Bases:
str
,enum.Enum
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- HOURLY = 'HOURLY'
- DAILY = 'DAILY'
- WEEKLY = 'WEEKLY'
- class utils.rc.dtos.project.Project(data={})
- addDataset(dataset_name, dataset_description, dataset_display_name=None, dataset_file_path=None, entity_type='BASE', entity_ontology='NONE', data_source_id=None, data_source_options=None, force_upload=False, metadata=None, dataset_meta=None, markdown=None, icon=None, image=None) utils.rcclient.entities.dataset.Dataset
Adds dataset to the project
- Parameters:
dataset_name (str) – name of the dataset
dataset_description (str) – description of the dataset
dataset_display_name (str, optional) – display name of the dataset. Defaults to None.
dataset_file_path (str, optional) – path of the file in your local file system
None. (s3 etc. Defaults to)
entity_type (str, optional) – Defaults to “BASE”.
entity_ontology (str, optional) – Defaults to “NONE”.
data_source_id (str, optional) – External data source id, needed if dataset is created from
gcp (external data source such as)
blob (azure)
None.
data_source_options (map, optional) – external data source options. Defaults to None.
force_upload (bool, optional) – Defaults to False.
metadata (dict, optional) – key value pair attached to dataset, Defaults to None.
dataset_meta
- Returns:
created dataset
- Return type:
- add_rapid_model_recipe(name: str, datasets: List[utils.rcclient.entities.dataset.Dataset], problem_type: utils.rcclient.enums.RapidModelRecipeType, display_name: str = None, metadata: dict = None, artifacts: List[str] = [], models: List[str] = [], variables: Dict[str, str] = {})
- addRecipe(datasets: List[utils.rcclient.entities.dataset.Dataset], name: str, display_name: str = None, condition: utils.rcclient.entities.segment.ItemExpression = None, metadata: dict = None, artifacts: List[str] = [], models: List[str] = [], timeout_in_hours: int = None, markdown: str = None, icon: str = None, image: str = None, recipe_type: utils.rcclient.enums.RecipeType = RecipeType.STANDARD) utils.rc.dtos.recipe.Recipe
Add a recipe to the system. :param datasets: A list of Dataset objects that the recipe will operate on. :type datasets: List[Dataset] :param name: The name of the recipe. :type name: str :param display_name: The display name for the recipe (default is None). :type display_name: str, optional :param condition: The condition or filter to apply on the datasets before running the recipe (default is None). :type condition: ItemExpression, optional :param metadata: Additional metadata for the recipe (default is None). :type metadata: dict, optional :param artifacts: A list of artifact names associated with the recipe (default is an empty list). :type artifacts: List[str], optional :param models: A list of model names associated with the recipe (default is an empty list). :type models: List[str], optional :param timeout_in_hours: The maximum time (in hours) allowed for the recipe execution before it times out (default is None). :type timeout_in_hours: int, optional
- Returns:
The Recipe object that was added to the system.
- Return type:
- run(scenario_ids: list = None)
- getAllDatasets() List[utils.rcclient.entities.dataset.Dataset]
Get all datasets available in the project :returns: list of datasets :rtype: list[Dataset]
- publish(datasetFiles={})
- classmethod find_by_id(id: str)
Find an object by its ID. This class method searches for an object with the specified ID and returns it if found. :param id: The ID of the object to find. :type id: str
- Returns:
The found object if it exists, or None if no object is found.
- Return type:
Union[None, SomeClass]
- static create(name: str, description: str, display_name: str = None, icon: str = None, createEmpty: bool = False, solutionId: str = None, envId: str = None, global_variables: dict = None, metadata: dict = None, markdown: str = None) Project
Creates a project within the tenant, if project already exists with the name then same project will be returned
- Parameters:
name (str) – name of the project
description (str) – description of the project
display_name (str, optional) – display name of the project. Defaults to None.
icon (str, optional) – icon file for the project. Defaults to None.
createEmpty (bool, optional) – if it is true, then existing project will be deleted
False. (and new one will be created. Defaults to)
solutionId (str, optional) – if it is present, project will be created from the solution. Defaults to None.
envId (str, optional) – if env id is there, all the recipes will run on this environment. Defaults to None.
global_variables (dict, optional) – Defaults to None.
metadata (dict, optional) – key value pair attached to project. Defaults to None.
- Returns:
created project object
- Return type:
- static getAllProjects() dict
Get all projects within the tenant
- Returns:
all project indexed on name
- Return type:
dict
- static deleteProject(projectId: str)
Deletes the project by id from the tenant
- Parameters:
projectId (str) – id of the project
- static deleteDataset(datasetId: str)
Deletes the dataset by id from the project
- Parameters:
datasetId (str) – id of the dataset
- static deleteRecipe(recipeId: str)
Deletes the recipe by id from the project
- Parameters:
recipeId (str) – id of the recipe
- getAllRecipes() List[utils.rc.dtos.recipe.Recipe]
Get all recipes within the project
- Returns:
all recipes indexed by name
- Return type:
list[Recipe]
- get_all_variables() List[utils.rcclient.entities.scenario.Scenario.Variable]
- get_variable_by(recipe_name: str, transform_name: str, name: str) utils.rcclient.entities.scenario.Scenario.Variable
- get_all_scenarios(scenario_name: str = None, experiment_id: str = None) List[utils.rcclient.entities.scenario.Scenario]
- add_scenario(name: str, variables: list = [], shared_variables: dict = {}, description: str = None, segment_ids: List[str] = []) utils.rcclient.entities.scenario.Scenario
Adds a new scenario to the project.
- Parameters:
name (str) – The name of the scenario.
variables (list, optional) – A list of variables to define the scenario’s inputs. Defaults to [].
shared_variables (dict, optional) – A dictionary of variables shared across multiple scenarios. Defaults to {}.
description (str, optional) – A description of the scenario. Defaults to None.
segment_ids (List[str], optional) – A list of segment IDs on which the scenario will run. Defaults to [].
- Returns:
The newly created scenario.
- Return type:
- Raises:
SomeException – An exception that may be raised under certain circumstances.
- run_scenarios(scenario_ids: List[str]) None
- run_scenario(scenario_id: str) None
- get_all_metadata() None