Skip to main content

Default session assertions

Dataform assertions#

Assertions helps you to checks data quality. It's actually a SQL query that should return 0 rows if everything is ok. If the query returns more than 0 rows - the assertion is failed.

You could read more about Dataform assertions here.

If you add assertions as dependencies it prevents the action from running if the assertion is failed. In the package assertions are not added as dependencies, so they don't block actions.

For all assertions and actions the package adds the same tag (equal to source dataset name). And if you run Dataform workflow with this tag, or run all actions - assertions would be executed after sessions. And if assertion is failed, the whole workflow would be marked as failed but sessions table would be updated anyway. So it's recommended to subscribe to worflow fails and check manually what the reason was.

Read official documentation - configure alerts for failed workflow invocations.

Session assertions#

You could add default session assertions using publishAssertions method.

NameDescription
Sessions TimelinessCheck that we have fresh sessions with a delay of no more than 2 days
Sessions CompletenessCheck that we have sessions for all days without gaps
Sessions ValidityCheck that sessions have all the required columns

`