File tree 1 file changed +3
-5
lines changed
samples/snippets/src/main/java/com/example/bigquery
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,13 @@ public static void queryWithStructsParameters() {
40
40
41
41
// Create struct
42
42
Map <String , QueryParameterValue > struct = new HashMap <>();
43
- struct .put ("booleanField" , QueryParameterValue .bool (true ));
44
- struct .put ("integerField" , QueryParameterValue .string ("test-stringField" ));
45
- struct .put ("stringField" , QueryParameterValue .int64 (10 ));
43
+ struct .put ("x" , QueryParameterValue .int64 (1 ));
44
+ struct .put ("y" , QueryParameterValue .string ("foo" ));
46
45
QueryParameterValue recordValue = QueryParameterValue .struct (struct );
47
46
48
- String query = "SELECT STRUCT(@recordField) AS record " ;
47
+ String query = "SELECT STRUCT(@recordField) AS s " ;
49
48
QueryJobConfiguration queryConfig =
50
49
QueryJobConfiguration .newBuilder (query )
51
- .setUseLegacySql (false )
52
50
.addNamedParameter ("recordField" , recordValue )
53
51
.build ();
54
52
You can’t perform that action at this time.
0 commit comments