Class InsertAllRequest.RowToInsert (2.6.2)

public static class InsertAllRequest.RowToInsert implements Serializable

A Google Big Query row to be inserted into a table. Each RowToInsert has an associated id used by BigQuery to detect duplicate insertion requests on a best-effort basis.

To ensure proper serialization of numeric data, it is recommended to supply values using a string-typed representation. Additionally, data for fields of 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

Inheritance

Object > InsertAllRequest.RowToInsert

Implements

Serializable

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getContent()

public Map<String,Object> getContent()

Returns the actual content of the row, as a map.

The returned map is always immutable. Its iteration order is unspecified.

Returns
TypeDescription
Map<String,Object>

getId()

public String getId()

Returns the id associated with the row. Returns null if not set.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

of(String id, Map<String,?> content)

public static InsertAllRequest.RowToInsert of(String id, Map<String,?> content)

Creates a row to be inserted with associated id.

To ensure proper serialization of numeric data, supply values using a string-typed representation. Additionally, data for fields of LegacySQLTypeName#BYTES must be provided as a base64 encoded string.

Parameters
NameDescription
idString

id of the row, used to identify duplicates

contentMap<String,?>

the actual content of the row

Returns
TypeDescription
InsertAllRequest.RowToInsert

of(Map<String,?> content)

public static InsertAllRequest.RowToInsert of(Map<String,?> content)

Creates a row to be inserted without associated id.

To ensure proper serialization of numeric data, supply values using a string-typed representation. Additionally, data for fields of type LegacySQLTypeName#BYTES must be provided as a base64 encoded string.

Parameter
NameDescription
contentMap<String,?>

the actual content of the row

Returns
TypeDescription
InsertAllRequest.RowToInsert

toString()

public String toString()
Returns
TypeDescription
String
Overrides