File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
samples/snippets/src/test/java/com/example/bigquery Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1919import static com .google .common .truth .Truth .assertThat ;
2020import static junit .framework .TestCase .assertNotNull ;
2121
22+ import com .google .cloud .bigquery .Field ;
2223import com .google .cloud .bigquery .Schema ;
24+ import com .google .cloud .bigquery .StandardSQLTypeName ;
2325import java .io .ByteArrayOutputStream ;
2426import java .io .PrintStream ;
2527import java .util .UUID ;
@@ -62,7 +64,11 @@ public void setUp() {
6264 tableName = "UNDELETE_TABLE_TEST_" + UUID .randomUUID ().toString ().substring (0 , 8 );
6365 recoverTableName = "RECOVER_DELETE_TABLE_TEST_" + UUID .randomUUID ().toString ().substring (0 , 8 );
6466 // Create table in dataset for testing
65- CreateTable .createTable (BIGQUERY_DATASET_NAME , tableName , Schema .of ());
67+ Schema schema =
68+ Schema .of (
69+ Field .of ("stringField" , StandardSQLTypeName .STRING ),
70+ Field .of ("booleanField" , StandardSQLTypeName .BOOL ));
71+ CreateTable .createTable (BIGQUERY_DATASET_NAME , tableName , schema );
6672 }
6773
6874 @ After
You can’t perform that action at this time.
0 commit comments