Attributes¶
brickflow.context.context.BRANCH_SKIP_EXCEPT = 'branch_skip_except'
module-attribute
¶
brickflow.context.context.RETURN_VALUE_KEY = 'return_value'
module-attribute
¶
brickflow.context.context.SKIP_EXCEPT_HACK = 'brickflow_hack_skip_all'
module-attribute
¶
brickflow.context.context.T = TypeVar('T')
module-attribute
¶
brickflow.context.context.ctx = Context()
module-attribute
¶
Classes¶
brickflow.context.context.BrickflowBuiltInTaskVariables
¶
Bases: Enum
Attributes¶
job_id = 'brickflow_job_id'
class-attribute
instance-attribute
¶
parent_run_id = 'brickflow_parent_run_id'
class-attribute
instance-attribute
¶
run_id = 'brickflow_run_id'
class-attribute
instance-attribute
¶
start_date = 'brickflow_start_date'
class-attribute
instance-attribute
¶
start_time = 'brickflow_start_time'
class-attribute
instance-attribute
¶
task_key = 'brickflow_task_key'
class-attribute
instance-attribute
¶
task_retry_count = 'brickflow_task_retry_count'
class-attribute
instance-attribute
¶
brickflow.context.context.BrickflowInternalVariables
¶
Bases: Enum
Attributes¶
env = BrickflowEnvVars.BRICKFLOW_ENV.value.lower()
class-attribute
instance-attribute
¶
only_run_tasks = 'brickflow_internal_only_run_tasks'
class-attribute
instance-attribute
¶
task_id = 'brickflow_internal_task_name'
class-attribute
instance-attribute
¶
workflow_id = 'brickflow_internal_workflow_name'
class-attribute
instance-attribute
¶
workflow_prefix = 'brickflow_internal_workflow_prefix'
class-attribute
instance-attribute
¶
workflow_suffix = 'brickflow_internal_workflow_suffix'
class-attribute
instance-attribute
¶
brickflow.context.context.BrickflowTaskComs
dataclass
¶
Attributes¶
dbutils: Optional[Any] = None
class-attribute
instance-attribute
¶
storage: Dict[str, Any] = field(init=False, default_factory=lambda : {})
class-attribute
instance-attribute
¶
Functions¶
get(task_id: str, key: Optional[str] = None) -> Any
¶
Source code in brickflow/context/context.py
put(task_id: str, key: str, value: Any) -> None
¶
Source code in brickflow/context/context.py
brickflow.context.context.BrickflowTaskComsDict
dataclass
¶
brickflow.context.context.BrickflowTaskComsObject
dataclass
¶
Attributes¶
to_encoded_value: str
property
¶
value: Any
property
¶
Functions¶
from_encoded_value(encoded_value: Union[str, bytes]) -> BrickflowTaskComsObject
classmethod
¶
Source code in brickflow/context/context.py
brickflow.context.context.Context()
¶
Source code in brickflow/context/context.py
Attributes¶
current_project: Optional[str]
property
¶
current_task: Optional[str]
property
¶
dbutils: DBUtils
property
¶
env: str
property
¶
log: logging.Logger
property
¶
spark: SparkSession
property
¶
task_coms: BrickflowTaskComs
property
¶
Functions¶
dbutils_widget_get_or_else(key: str, debug: Optional[str]) -> Optional[str]
¶
get_by_env(purpose: str, *, default: Optional[T] = None, local: Optional[T] = None, dev: Optional[T] = None, non_prod: Optional[T] = None, test: Optional[T] = None, qa: Optional[T] = None, prod: Optional[T] = None, uat: Optional[T] = None, **kwargs: Optional[T]) -> Optional[T]
¶
Source code in brickflow/context/context.py
get_parameter(key: str, debug: Optional[str] = None) -> Optional[str]
¶
Source code in brickflow/context/context.py
get_return_value(task_key: Union[str, Callable]) -> Any
¶
is_local() -> bool
¶
job_id(*, debug: Optional[str] = None) -> Any
¶
This function fetches the job_id value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
parent_run_id(*, debug: Optional[str] = None) -> Any
¶
This function fetches the parent_run_id value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
run_id(*, debug: Optional[str] = None) -> Any
¶
This function fetches the run_id value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
set_current_project(project: str) -> None
¶
skip_all_except(branch_task: Union[Callable, str]) -> None
¶
Source code in brickflow/context/context.py
skip_all_following() -> None
¶
start_date(*, debug: Optional[str] = None) -> Any
¶
This function fetches the start_date value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
start_time(*, debug: Optional[str] = None) -> Any
¶
This function fetches the start_time value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
task_key(*, debug: Optional[str] = None) -> Any
¶
This function fetches the task_key value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.
Source code in brickflow/context/context.py
task_retry_count(*, debug: Optional[str] = None) -> Any
¶
This function fetches the task_retry_count value using the bind_variable decorator. The implementation is intentionally empty because the decorator handles the logic.