Search in sources :

Example 1 with BigqueryMatcher

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));
}
Also used : BigqueryMatcher(org.apache.beam.sdk.io.gcp.testing.BigqueryMatcher) Test(org.junit.Test)

Aggregations

BigqueryMatcher (org.apache.beam.sdk.io.gcp.testing.BigqueryMatcher)1 Test (org.junit.Test)1