Skip to content

[FEATURE]: Add checks retrieval from a file #49

Closed
@mwojtyczka

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

No response

Proposed Solution

Add load_from_file function to retrieve quality rules defined in a file as json and return list of quality rules. There should be optional filename argument. If not provided, the location should be retrieved from a config.yaml ('checks' param) located in the installation directory.

Example:

from databricks.labs.blueprint.installation import Installation

def load_from_file(filename: None | str) -> list[DQRule]:
    print(f"Loading quality rules (checks) from {filename}")
    installation = Installation.current(ws, "dqx")
    if not filename:
       filename = self.config.checks_location
    return installation.load(list[DQRule], filename=filename)

Readme should be updated accordingly

Additional Context

Depends on: #15

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions