Skip to main content

databricks.labs.dqx.contexts.workflow_context

WorkflowContext Objects

class WorkflowContext(GlobalContext)

WorkflowContext class that provides a context for workflows, including workspace configuration,

config

@cached_property
def config() -> WorkspaceConfig

Loads and returns the workspace configuration.

spark

@cached_property
def spark() -> SparkSession

Returns spark session.

run_config

@cached_property
def run_config() -> RunConfig

Loads and returns the run configuration.

product_info

@cached_property
def product_info() -> ProductInfo

Returns the ProductInfo instance for the runtime. If product_name is provided in named_parameters, it overrides the default product name. This is useful for testing or when the product name needs to be dynamically set at runtime.

workspace_client

@cached_property
def workspace_client() -> WorkspaceClient

Returns the WorkspaceClient instance.

installation

@cached_property
def installation() -> Installation

Returns the installation instance for the runtime.

profiler

@cached_property
def profiler() -> ProfilerRunner

Returns the ProfilerRunner instance.

quality_checker

@cached_property
def quality_checker() -> QualityCheckerRunner

Returns the QualityCheckerRunner instance.