@@ -49,7 +49,9 @@ public final class InsertAllRequest implements Serializable {
49
49
50
50
/**
51
51
* A Google Big Query row to be inserted into a table. Each {@code RowToInsert} has an associated
52
- * id used by BigQuery to detect duplicate insertion requests on a best-effort basis.
52
+ * id used by BigQuery to detect duplicate insertion requests on a best-effort basis. Please
53
+ * notice that data for fields of type {@link Field.Type#bytes()} must be provided as a base64
54
+ * encoded string.
53
55
*
54
56
* <p>Example usage of creating a row to insert:
55
57
* <pre> {@code
@@ -58,8 +60,9 @@ public final class InsertAllRequest implements Serializable {
58
60
* recordContent.put("subfieldName1", "value");
59
61
* recordContent.put("subfieldName2", repeatedFieldValue);
60
62
* Map<String, Object> rowContent = new HashMap<String, Object>();
61
- * rowContent.put("fieldName1", true);
62
- * rowContent.put("fieldName2", recordContent);
63
+ * rowContent.put("booleanFieldName", true);
64
+ * rowContent.put("bytesFieldName", "DQ4KDQ==");
65
+ * rowContent.put("recordFieldName", recordContent);
63
66
* RowToInsert row = new RowToInsert("rowId", rowContent);
64
67
* }</pre>
65
68
*
@@ -116,7 +119,8 @@ public boolean equals(Object obj) {
116
119
}
117
120
118
121
/**
119
- * Creates a row to be inserted with associated id.
122
+ * Creates a row to be inserted with associated id. Please notice that data for fields of type
123
+ * {@link Field.Type#bytes()} must be provided as a base64 encoded string.
120
124
*
121
125
* @param id id of the row, used to identify duplicates
122
126
* @param content the actual content of the row
@@ -126,7 +130,8 @@ public static RowToInsert of(String id, Map<String, Object> content) {
126
130
}
127
131
128
132
/**
129
- * Creates a row to be inserted without associated id.
133
+ * Creates a row to be inserted without associated id. Please notice that data for fields of
134
+ * type {@link Field.Type#bytes()} must be provided as a base64 encoded string.
130
135
*
131
136
* @param content the actual content of the row
132
137
*/
@@ -174,7 +179,8 @@ public Builder addRow(RowToInsert rowToInsert) {
174
179
}
175
180
176
181
/**
177
- * Adds a row to be inserted with associated id.
182
+ * Adds a row to be inserted with associated id. Please notice that data for fields of type
183
+ * {@link Field.Type#bytes()} must be provided as a base64 encoded string.
178
184
*
179
185
* <p>Example usage of adding a row with associated id:
180
186
* <pre> {@code
@@ -184,8 +190,9 @@ public Builder addRow(RowToInsert rowToInsert) {
184
190
* recordContent.put("subfieldName1", "value");
185
191
* recordContent.put("subfieldName2", repeatedFieldValue);
186
192
* Map<String, Object> rowContent = new HashMap<String, Object>();
187
- * rowContent.put("fieldName1", true);
188
- * rowContent.put("fieldName2", recordContent);
193
+ * rowContent.put("booleanFieldName", true);
194
+ * rowContent.put("bytesFieldName", "DQ4KDQ==");
195
+ * rowContent.put("recordFieldName", recordContent);
189
196
* builder.addRow("rowId", rowContent);
190
197
* }</pre>
191
198
*/
@@ -195,7 +202,8 @@ public Builder addRow(String id, Map<String, Object> content) {
195
202
}
196
203
197
204
/**
198
- * Adds a row to be inserted without an associated id.
205
+ * Adds a row to be inserted without an associated id. Please notice that data for fields of
206
+ * type {@link Field.Type#bytes()} must be provided as a base64 encoded string.
199
207
*
200
208
* <p>Example usage of adding a row without an associated id:
201
209
* <pre> {@code
@@ -205,8 +213,9 @@ public Builder addRow(String id, Map<String, Object> content) {
205
213
* recordContent.put("subfieldName1", "value");
206
214
* recordContent.put("subfieldName2", repeatedFieldValue);
207
215
* Map<String, Object> rowContent = new HashMap<String, Object>();
208
- * rowContent.put("fieldName1", true);
209
- * rowContent.put("fieldName2", recordContent);
216
+ * rowContent.put("booleanFieldName", true);
217
+ * rowContent.put("bytesFieldName", "DQ4KDQ==");
218
+ * rowContent.put("recordFieldName", recordContent);
210
219
* builder.addRow(rowContent);
211
220
* }</pre>
212
221
*/
0 commit comments