We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems to be impossible write data because of descriptor_fix.php (though it might be solving other issues).
I couldn't find any other way to use AppendRows other than using Proto-stuffs functionality.
AppendRows
Proto
The provided sample does not relieve the pain of explaining how data is sent.
There are mentions of fixes and AppendsRows, mainly by @bshaffer , but I could not find any information on how to move forward without using Proto-stuffs.
AppendsRows
// prerequisites $bigQueryWriteClient = new BigQueryWriteClient(); $parent = 'pathhere'; // setup the structure $row = new Struct(); $row->setFields([ 'impressions' => (new Value())->setNumberValue(213), ]); $protoRows = new ProtoRows(); $protoRows->setSerializedRows([$row->serializeToString()]); // add the data $protoData = new ProtoData([ 'rows' => $protoRows, ]); // set the schema, which requires the descriptor $protoData->setWriterSchema(new ProtoSchema([ 'proto_descriptor' => new \Google\Protobuf\DescriptorProto(), ])); // create the append rows request $appendRowsRequest = new AppendRowsRequest([ 'write_stream' => $parent . '/streams/_default', 'proto_rows' => $protoData ]); // do the writing $stream = $bigQueryWriteClient->appendRows(); $stream->write($appendRowsRequest); // finalize foreach ($stream->closeWriteAndReadAll() as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment details
Steps to reproduce
It seems to be impossible write data because of descriptor_fix.php (though it might be solving other issues).
I couldn't find any other way to use
AppendRows
other than usingProto
-stuffs functionality.The provided sample does not relieve the pain of explaining how data is sent.
There are mentions of fixes and
AppendsRows
, mainly by @bshaffer , but I could not find any information on how to move forward without usingProto
-stuffs.Code example
The text was updated successfully, but these errors were encountered: