Constructor
new JSONWriter(params)
Creates a new JSONWriter instance.
Parameters:
Name | Type | Description |
---|---|---|
params |
WriterOptions |
The parameters for the JSONWriter. See WriterOptions docs for more information. |
- See:
Extends
Methods
appendRows(rows, offsetValue?) → {managedwriter.PendingWrite}
Writes a JSONList that contains objects to be written to the BigQuery table by first converting the JSON data to protobuf messages, then using Writer's appendRows() to write the data at current end of stream. If there is a schema update, the current Writer is closed and reopened with the updated schema.
Parameters:
Name | Type | Description |
---|---|---|
rows |
JSONList |
The list of JSON rows. |
offsetValue? |
number | Long | string | null |
The offset value. |
Returns:
Type | Description |
---|---|
managedwriter.PendingWrite |
The pending write. |
- Overrides:
setDefaultMissingValueInterpretation(defaultMissingValueInterpretation)
Update how missing values are interpreted for the given stream.
Parameters:
Name | Type | Description |
---|---|---|
defaultMissingValueInterpretation |
MissingValueInterpretation |
setMissingValueInterpretations(missingValueInterpretations)
Update how missing values are interpreted for individual columns.
Parameters:
Name | Type | Description |
---|---|---|
missingValueInterpretations |
MissingValueInterpretationMap |
setProtoDescriptor(protoDescriptor)
Update the proto descriptor for the Writer. Internally a reconnection event is gonna happen to apply the new proto descriptor.
Parameters:
Name | Type | Description |
---|---|---|
protoDescriptor |
IDescriptorProto |
The proto descriptor. |
- Overrides: