Class TestBigQuery
java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.TestBigQuery
- All Implemented Interfaces:
 TestRule
Test rule which creates a new table with specified schema, with randomized name and exposes few
 APIs to work with it.
 
Deletes the table on test shutdown.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to implement a polling assertion.classInterface for creating a polling eventual assertion. - 
Method Summary
Modifier and TypeMethodDescriptionapply(Statement base, Description description) assertThatAllRows(Schema rowSchema) static TestBigQueryCreates an instance of this rule.getFlatJsonRows(Schema rowSchema) insertRows(Schema rowSchema, Row... rows)  
- 
Method Details
- 
create
Creates an instance of this rule.Loads GCP configuration from
TestPipelineOptions. - 
apply
 - 
tableSpec
 - 
tableReference
 - 
insertRows
@RequiresNonNull("table") public TableDataInsertAllResponse insertRows(Schema rowSchema, Row... rows) throws IOException - Throws:
 IOException
 - 
getFlatJsonRows
Loads rows from BigQuery intoRowswith givenSchema.Current implementation only supports flat
Rowsand targetSchemaswithSchema.FieldType.STRINGfields only. - 
assertThatAllRows
 
 -