跳到主要内容
版本:v2.5.x

append_row()

This operation appends records to the writer.

Java
public void appendRow(JsonObject rowData)

Request Syntax

Java
localBulkWriter.appendRow(
JsonObject rowData
)

PARAMETERS:

  • rowData (JsonObject) -

    A dictionary representing an entity to be appended.

    The keys and their values in the dictionary should match the schema referenced in the current LocalBulkWriter.

RETURN TYPE:

void

Example

Java
JsonObject row = new JsonObject();
row.addProperty("path", "path_" + i);
row.add("vector", GSON_INSTANCE.toJsonTree(GeneratorUtils.genFloatVector(DIM)));
row.addProperty("label", "label_" + i);

localBulkWriter.appendRow(row);