use of org.apache.beam.sdk.io.gcp.testing.BigqueryMatcher in project beam by apache.
the class BigQueryTornadoesIT method testE2EBigQueryTornadoes.
@Test
public void testE2EBigQueryTornadoes() throws Exception {
BigQueryTornadoesITOptions options = TestPipeline.testingPipelineOptions().as(BigQueryTornadoesITOptions.class);
options.setOutput(String.format("%s.%s", "BigQueryTornadoesIT", "monthly_tornadoes_" + System.currentTimeMillis()));
String query = String.format("SELECT month, tornado_count FROM [%s]", options.getOutput());
options.setOnSuccessMatcher(new BigqueryMatcher(options.getAppName(), options.getProject(), query, DEFAULT_OUTPUT_CHECKSUM));
BigQueryTornadoes.main(TestPipeline.convertToArgs(options));
}
Aggregations