databricks.labs.dqx.config_serializer
ConfigSerializer Objects
class ConfigSerializer(InstallationMixin)
Class to handle loading of configuration from the installation.
load_config
def load_config(product_name: str = "dqx",
assume_user: bool = True,
install_folder: str | None = None) -> WorkspaceConfig
Load workspace configuration from the installation. The workspace config contains all run configs.
Arguments:
product_name- name of the productassume_user- if True, assume user installationinstall_folder- Custom workspace installation folder. Required if DQX is installed in a custom folder.
Returns:
WorkspaceConfig- Loaded workspace configuration.
save_config
def save_config(config: WorkspaceConfig,
product_name: str = "dqx",
assume_user: bool = True,
install_folder: str | None = None) -> None
Save workspace config in the installation.
Arguments:
config- Workspace config object to saveproduct_name- Product/installation identifier used to resolve installation paths (not used if install_folder is provided)assume_user- Whether to assume a per-user installation when loading the run configuration (not used if install_folder is provided)install_folder- Custom workspace installation folder. Required if DQX is installed in a custom folder.
Returns:
None
load_run_config
def load_run_config(run_config_name: str | None,
product_name: str = "dqx",
assume_user: bool = True,
install_folder: str | None = None) -> RunConfig
Load run configuration from the installation.
Arguments:
run_config_name- Name of the run configuration to use, e.g. input table or job name.product_name- Product/installation identifier used to resolve installation paths (not used if install_folder is provided)assume_user- Whether to assume a per-user installation when loading the run configuration (not used if install_folder is provided)install_folder- Custom workspace installation folder. Required if DQX is installed in a custom folder.
Returns:
RunConfig- Loaded run configuration.
save_run_config
def save_run_config(run_config: RunConfig,
product_name: str = "dqx",
assume_user: bool = True,
install_folder: str | None = None) -> None
Save run config in the workspace installation config.
Arguments:
run_config- Run config object to save in the workspace configproduct_name- Product/installation identifier used to resolve installation paths (not used if install_folder is provided)assume_user- Whether to assume a per-user installation when loading the run configuration (not used if install_folder is provided)install_folder- Custom workspace installation folder. Required if DQX is installed in a custom folder.
Returns:
None