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: WriterOptions);
Creates a new Writer instance.
Parameter | |
---|---|
Name | Description |
params |
WriterOptions
The parameters for the Writer. See WriterOptions docs for more information. |
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 |
setDefaultMissingValueInterpretation(defaultMissingValueInterpretation)
setDefaultMissingValueInterpretation(defaultMissingValueInterpretation: MissingValueInterpretation): void;
Update how missing values are interpreted for the given stream.
Parameter | |
---|---|
Name | Description |
defaultMissingValueInterpretation |
MissingValueInterpretation
|
Returns | |
---|---|
Type | Description |
void |
setMissingValueInterpretations(missingValueInterpretations)
setMissingValueInterpretations(missingValueInterpretations: MissingValueInterpretationMap): void;
Update how missing values are interpreted for individual columns.
Parameter | |
---|---|
Name | Description |
missingValueInterpretations |
MissingValueInterpretationMap
|
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 |