public static class InsertAllRequest.RowToInsert extends Object implements Serializable
RowToInsert
has an associated
id used by BigQuery to detect duplicate insertion requests on a best-effort basis. Please
notice that data for fields of type LegacySQLTypeName.BYTES
must be provided as a
base64 encoded string.
Example usage of creating a row to insert:
List<Long> repeatedFieldValue = Arrays.asList(1L, 2L);
Map<String, Object> recordContent = new HashMap<String, Object>();
recordContent.put("subfieldName1", "value");
recordContent.put("subfieldName2", repeatedFieldValue);
Map<String, Object> rowContent = new HashMap<String, Object>();
rowContent.put("booleanFieldName", true);
rowContent.put("bytesFieldName", "DQ4KDQ==");
rowContent.put("recordFieldName", recordContent);
RowToInsert row = new RowToInsert("rowId", rowContent);
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Map<String,Object> |
getContent()
Returns the actual content of the row, as a map.
|
String |
getId()
Returns the id associated with the row.
|
int |
hashCode() |
static InsertAllRequest.RowToInsert |
of(Map<String,?> content)
Creates a row to be inserted without associated id.
|
static InsertAllRequest.RowToInsert |
of(String id,
Map<String,?> content)
Creates a row to be inserted with associated id.
|
String |
toString() |
public String getId()
null
if not set.public Map<String,Object> getContent()
The returned map is always immutable. Its iteration order is unspecified.
public static InsertAllRequest.RowToInsert of(String id, Map<String,?> content)
LegacySQLTypeName.BYTES
must be provided as a base64 encoded string.id
- id of the row, used to identify duplicatescontent
- the actual content of the rowpublic static InsertAllRequest.RowToInsert of(Map<String,?> content)
LegacySQLTypeName.BYTES
must be provided as a base64 encoded string.content
- the actual content of the rowCopyright © 2019 Google LLC. All rights reserved.