Classes¶
brickflow.engine.task.Task(task_id: str, task_func: Callable, workflow: Workflow, cluster: Cluster, description: Optional[str] = None, libraries: List[TaskLibrary] = lambda: [](), depends_on: List[Union[Callable, str]] = lambda: [](), task_type: TaskType = TaskType.BRICKFLOW_TASK, trigger_rule: BrickflowTriggerRule = BrickflowTriggerRule.ALL_SUCCESS, task_settings: Optional[TaskSettings] = None, custom_execute_callback: Optional[Callable] = None, ensure_brickflow_plugins: bool = False, health: Optional[List[JobsTasksHealthRules]] = None)
dataclass
¶
Attributes¶
brickflow_default_params: Dict[str, str]
property
¶
builtin_notebook_params: Dict[str, str]
property
¶
cluster: Cluster
instance-attribute
¶
custom_execute_callback: Optional[Callable] = None
class-attribute
instance-attribute
¶
custom_task_parameters: Dict[str, str]
property
¶
databricks_task_type_str: str
property
¶
depends_on: List[Union[Callable, str]] = field(default_factory=lambda: [])
class-attribute
instance-attribute
¶
depends_on_names: Iterator[str]
property
¶
description: Optional[str] = None
class-attribute
instance-attribute
¶
ensure_brickflow_plugins: bool = False
class-attribute
instance-attribute
¶
health: Optional[List[JobsTasksHealthRules]] = None
class-attribute
instance-attribute
¶
libraries: List[TaskLibrary] = field(default_factory=lambda: [])
class-attribute
instance-attribute
¶
name: str
property
¶
parents: List[str]
property
¶
task_func: Callable
instance-attribute
¶
task_func_name: str
property
¶
task_id: str
instance-attribute
¶
task_settings: Optional[TaskSettings] = None
class-attribute
instance-attribute
¶
task_type: TaskType = TaskType.BRICKFLOW_TASK
class-attribute
instance-attribute
¶
trigger_rule: BrickflowTriggerRule = BrickflowTriggerRule.ALL_SUCCESS
class-attribute
instance-attribute
¶
workflow: Workflow
instance-attribute
¶
Functions¶
execute(ignore_all_deps: bool = False) -> Any
¶
Source code in brickflow/engine/task.py
get_obj_dict(entrypoint: str) -> Dict[str, Any]
¶
Source code in brickflow/engine/task.py
get_runtime_parameter_values() -> Dict[str, Any]
¶
Source code in brickflow/engine/task.py
handle_notebook_path(entrypoint: str) -> str
staticmethod
¶
Source code in brickflow/engine/task.py
is_valid_task_signature() -> None
¶
Source code in brickflow/engine/task.py
should_skip() -> Tuple[bool, Optional[str]]
¶
Source code in brickflow/engine/task.py
brickflow.engine.task.EmailNotifications(on_failure: Optional[List[str]] = None, on_success: Optional[List[str]] = None, on_start: Optional[List[str]] = None)
dataclass
¶
brickflow.engine.task.JarTaskLibrary(jar: str)
dataclass
¶
brickflow.engine.task.EggTaskLibrary(egg: str)
dataclass
¶
brickflow.engine.task.WheelTaskLibrary(whl: str)
dataclass
¶
brickflow.engine.task.PypiTaskLibrary(package: str, repo: Optional[str] = None)
dataclass
¶
Bases: TaskLibrary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package |
str
|
The package in pypi i.e. requests, requests==x.y.z, git+https://github.com/Nike-Inc/brickflow.git |
required |
repo |
Optional[str]
|
The repository where the package can be found. By default pypi is used |
None
|
brickflow.engine.task.MavenTaskLibrary(coordinates: str, repo: Optional[str] = None, exclusions: Optional[List[str]] = None)
dataclass
¶
Bases: TaskLibrary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coordinates |
str
|
Gradle-style Maven coordinates. For example: org.jsoup:jsoup:1.7.2. |
required |
repo |
Optional[str]
|
Maven repo to install the Maven package from. If omitted, both Maven Central Repository and Spark Packages are searched. |
None
|
exclusions |
Optional[List[str]]
|
List of dependences to exclude. For example: ["slf4j:slf4j", "*:hadoop-client"]. Maven dependency exclusions: https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html. |
None
|
brickflow.engine.task.CranTaskLibrary(package: str, repo: Optional[str] = None)
dataclass
¶
Bases: TaskLibrary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package |
str
|
The name of the CRAN package to install. |
required |
repo |
Optional[str]
|
The repository where the package can be found. If not specified, the default CRAN repo is used. |
None
|
brickflow.engine.task.BrickflowTriggerRule
¶
brickflow.engine.task.BrickflowTaskEnvVars
¶
brickflow.engine.task.TaskSettings(email_notifications: Optional[EmailNotifications] = None, notification_settings: Optional[TaskNotificationSettings] = None, timeout_seconds: Optional[int] = None, max_retries: Optional[int] = None, min_retry_interval_millis: Optional[int] = None, retry_on_timeout: Optional[bool] = None, run_if: Optional[TaskRunCondition] = None)
dataclass
¶
Attributes¶
email_notifications: Optional[EmailNotifications] = None
class-attribute
instance-attribute
¶
max_retries: Optional[int] = None
class-attribute
instance-attribute
¶
min_retry_interval_millis: Optional[int] = None
class-attribute
instance-attribute
¶
notification_settings: Optional[TaskNotificationSettings] = None
class-attribute
instance-attribute
¶
retry_on_timeout: Optional[bool] = None
class-attribute
instance-attribute
¶
run_if: Optional[TaskRunCondition] = None
class-attribute
instance-attribute
¶
timeout_seconds: Optional[int] = None
class-attribute
instance-attribute
¶
Functions¶
merge(other: Optional['TaskSettings']) -> 'TaskSettings'
¶
Source code in brickflow/engine/task.py
to_tf_dict() -> Dict[str, Optional[str] | Optional[int] | Optional[bool] | Optional[Dict[str, Optional[List[str]]]]]
¶
Source code in brickflow/engine/task.py
brickflow.engine.task.TaskType
¶
Bases: Enum