Skip to content

Rule Definition#

[source]

RuleDefinition#

hsfs.ruledefinition.RuleDefinition(
    name,
    accepted_type,
    predicate=None,
    feature_type=None,
    description=None,
    href=None,
    expand=None,
    items=None,
    count=None,
    type=None,
)

Metadata object representing the validation rule that is used by feature group expectations.

The set of rule definitions, for example "has max", "has avg" is provided by hsfs and cannot be modified.


Properties#

[source]

accepted_type#

The type of the feature, one of "Null", "Fractional", "Integral", "Boolean", "String".


[source]

description#


[source]

feature_type#

The type of the feature, one of "Numerical", "Categorical".


[source]

name#

Name of the rule definition. Unique across all features stores.


[source]

predicate#

Predicate of the rule definition, one of "LEGAL_VALUES", "ACCEPTED_TYPE", "PATTERN".


Retrieval#

[source]

get_rules#

Connection.get_rules()

Get a rule with a certain name or all rules available for data validation.


[source]

get_rule#

Connection.get_rule(name)

Get a rule with a certain name or all rules available for data validation.