Skip to content

gRPC method for proton ingest api #941

Open
@rauanmayemir

Description

@rauanmayemir

Use case

Proton ingesting is built as http rest api, implementing a grpc endpoint would help somewhat safely lift data type limitations.
Even though proton has grpc protocol, it's tuned for querying the data, but not for ingesting.

Describe the solution you'd like

Extra method definition in proton.grpc.Proton service, something like:

// Based on WKT's google.protobuf.Struct
enum NullValue {
  // Null value.
  NULL_VALUE = 0;
}

message ArrayValue {
  repeated DataType values = 1;
}

message MapValue {
  map<string, DataType> values = 1;
}

message DataType {
  oneof kind {
    NullValue null_value = 1;
    // Automatic cast to smaller sizes
    int64 int_value = 2;
    // Automatic cast to smaller sizes
    uint64 uint_value = 3;
    // For decimal and float
    double double_value = 4;
    bool bool_value = 5;
    string string_value = 6;
    // Cast to string on the ingest side
    bytes bytes_value = 7;
    ArrayValue array_value = 8;
    MapValue map_value = 9;
  }
}

message IngestInfo {
  repeated string columns = 1;
  repeated ArrayValue data = 2;
}

service Proton {
  // ...
  rpc ExecuteIngest(IngestInfo) returns (Result) {}
  rpc ExecuteIngestWithStreamIO(stream IngestInfo) returns (stream Result) {}
}

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions