PipelineNodeExpectation
laktory.models.PipelineNodeExpectation
¤
Bases: BaseModel
Definition of an expectation for a given node output DataFrame. It consists of an SQL expression of the expectation and of an action to be taken if the expectation is not met. Similar to DLT Table Expectation. Currently only supported with DLT pipeline orchestrator.
ATTRIBUTE | DESCRIPTION |
---|---|
name |
Name of the expectation
TYPE:
|
expression |
SQL expression definition the constraint
TYPE:
|
action |
Action to take when expectation is not met.
TYPE:
|
Examples:
from laktory import models
e = models.PipelineNodeExpectation(
name="valid timestamp",
expression="col(“timestamp”) > '2012-01-01'",
action="DROP",
)
print(e)
'''
variables={} name='valid timestamp' expression="col(“timestamp”) > '2012-01-01'" action='DROP'
'''