Generating the Batch Data API Client Classes
Generating the Batch Data API Client Classes
The GPSS Batch Data API service definition defines messages and services exposed by the GPSS gRPC server. This definition resides in the gpss.proto file. You must run the protocol buffer compiler (protoc) on the gpss.proto file to generate the classes that the GPSS client uses to query metadata information from, and write data to, Greenplum Database.
In some build environments such as gradle, you can configure the build to automatically generate the GPSS client classes for you. Refer to the gRPC examples for your programming language for sample build configurations with automatic code generation. For example, the gradle build and settings files for the examples in the grpc-java repository are configured to automatically generate the Java classes for you.
$ protoc --plugin=protoc-gen-grpc-java=../grpc-java/compiler/build/exe/java_plugin/protoc-gen-grpc-java \ --proto_path=./src/main/proto --grpc-java_out=./gen/grpc/ \ --java_out=./gen/java/ gpss.proto