@@ -49,7 +49,9 @@ public final class InsertAllRequest implements Serializable {
4949
5050 /**
5151 * 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.
5355 *
5456 * <p>Example usage of creating a row to insert:
5557 * <pre> {@code
@@ -58,8 +60,9 @@ public final class InsertAllRequest implements Serializable {
5860 * recordContent.put("subfieldName1", "value");
5961 * recordContent.put("subfieldName2", repeatedFieldValue);
6062 * 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);
6366 * RowToInsert row = new RowToInsert("rowId", rowContent);
6467 * }</pre>
6568 *
@@ -116,7 +119,8 @@ public boolean equals(Object obj) {
116119 }
117120
118121 /**
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.
120124 *
121125 * @param id id of the row, used to identify duplicates
122126 * @param content the actual content of the row
@@ -126,7 +130,8 @@ public static RowToInsert of(String id, Map<String, Object> content) {
126130 }
127131
128132 /**
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.
130135 *
131136 * @param content the actual content of the row
132137 */
@@ -174,7 +179,8 @@ public Builder addRow(RowToInsert rowToInsert) {
174179 }
175180
176181 /**
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.
178184 *
179185 * <p>Example usage of adding a row with associated id:
180186 * <pre> {@code
@@ -184,8 +190,9 @@ public Builder addRow(RowToInsert rowToInsert) {
184190 * recordContent.put("subfieldName1", "value");
185191 * recordContent.put("subfieldName2", repeatedFieldValue);
186192 * 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);
189196 * builder.addRow("rowId", rowContent);
190197 * }</pre>
191198 */
@@ -195,7 +202,8 @@ public Builder addRow(String id, Map<String, Object> content) {
195202 }
196203
197204 /**
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.
199207 *
200208 * <p>Example usage of adding a row without an associated id:
201209 * <pre> {@code
@@ -205,8 +213,9 @@ public Builder addRow(String id, Map<String, Object> content) {
205213 * recordContent.put("subfieldName1", "value");
206214 * recordContent.put("subfieldName2", repeatedFieldValue);
207215 * 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);
210219 * builder.addRow(rowContent);
211220 * }</pre>
212221 */
0 commit comments