A BigQuery Storage API Writer that can be used to write data into BigQuery Table using the Storage API.
managedwriter
Package
@google-cloud/bigquery-storageConstructors
(constructor)(params)
constructor(params: {
connection: StreamConnection;
protoDescriptor: IDescriptorProto;
});
Creates a new Writer instance.
Parameter | |
---|---|
Name | Description |
params |
{
connection: StreamConnection;
protoDescriptor: IDescriptorProto;
}
The parameters for the JSONWriter. |
Methods
appendRows(rows, offsetValue)
appendRows(rows: ProtoData['rows'], offsetValue?: IInt64Value['value']): PendingWrite;
Schedules the writing of rows at given offset.
Parameters | |
---|---|
Name | Description |
rows |
ProtoData['rows']
the rows in serialized format to write to BigQuery. |
offsetValue |
IInt64Value_2['value']
the offset of the first row. |
Returns | |
---|---|
Type | Description |
PendingWrite | {managedwriter.PendingWrite} The pending write |
close()
close(): void;
Returns | |
---|---|
Type | Description |
void |
setProtoDescriptor(protoDescriptor)
setProtoDescriptor(protoDescriptor: IDescriptorProto): void;
Update the proto descriptor for the Writer. Internally a reconnection event is gonna happen to apply the new proto descriptor.
Parameter | |
---|---|
Name | Description |
protoDescriptor |
IDescriptorProto
The proto descriptor. |
Returns | |
---|---|
Type | Description |
void |