Utilities for testing Beam pipelines.
assert_that(actual, matcher, label='assert_that')¶
A PTransform that checks a PCollection has an expected value.
Note that assert_that should be used only for testing pipelines since the check relies on materializing the entire PCollection being checked.
- actual – A PCollection.
- matcher – A matcher function taking as argument the actual value of a materialized PCollection. The matcher validates this actual value against expectations and raises BeamAssertException if they are not met.
- label – Optional string label. This is needed in case several assert_that transforms are introduced in the same pipeline.
Returns a composite file of all shards matching the given glob pattern.