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 19
19
import static com .google .common .truth .Truth .assertThat ;
20
20
import static junit .framework .TestCase .assertNotNull ;
21
21
22
+ import com .google .cloud .bigquery .Field ;
22
23
import com .google .cloud .bigquery .Schema ;
24
+ import com .google .cloud .bigquery .StandardSQLTypeName ;
23
25
import java .io .ByteArrayOutputStream ;
24
26
import java .io .PrintStream ;
25
27
import java .util .UUID ;
@@ -62,7 +64,11 @@ public void setUp() {
62
64
tableName = "UNDELETE_TABLE_TEST_" + UUID .randomUUID ().toString ().substring (0 , 8 );
63
65
recoverTableName = "RECOVER_DELETE_TABLE_TEST_" + UUID .randomUUID ().toString ().substring (0 , 8 );
64
66
// 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 );
66
72
}
67
73
68
74
@ After
You can’t perform that action at this time.
0 commit comments