Skip to main content

All Questions

Tagged with
0 votes
0 answers
37 views

Issue with proto object defining isEmpty

we've got this protobuffer object definition (and we cannot modify it) ... message Condition { oneof condition_one_of { FieldCondition field = 1; IsEmptyCondition is_empty = 2; ...
mfirry's user avatar
  • 3,664
0 votes
1 answer
40 views

Convert a spark DataFrame to a slighly different case class?

I have some data in HDFS that is in parquet-protobuf. Due to some project constraints, I want to read that data with a spark DataFrame (easy) and then convert to a case class that is slightly ...
Tonyx's user avatar
  • 61
1 vote
0 answers
49 views

ScalaPB type class instance on the generated message companion object

Suppose there is a proto MyMessage and a type class TypeClass[T]. Is it possible to have a custom instance TypeClass[MyMessage] in the generated companion object of MyMessage, so any (implicit ...
Random42's user avatar
  • 9,129
0 votes
0 answers
99 views

Classes code generated from protobuf file not found in Scalapb

I'm new to Scalapb and currently I'm trying to compile a proto file to Scala classes as below build.sbt (made by George Leung / phiSgr - run normally on his demo project): // the enterprisePackage ...
TriNguyen's user avatar
0 votes
0 answers
58 views

ScalaPb annotations on sealed trait

I am trying to put an annotation on top of a generated sealed trait using scalaPb this way: message SealedTrait { option (scalapb.message).annotations ="@zio.json.jsonDiscriminator("...
Matroska's user avatar
  • 6,913
1 vote
0 answers
310 views

Spark Structured Streaming with Protobuf Data Source and Evolving Schema

In Spark 3.4.0, Protobuf was supported as a data source: https://spark.apache.org/docs/latest/sql-data-sources-protobuf.html Looking through the documentation, it's not clear exactly how this behaves ...
cdecoux's user avatar
  • 53
0 votes
0 answers
356 views

google.protobuf.doublevalue is not convert to option[double]

I write proto like this message I { google.protobuf.DoubleValue supplierCommissionAmount = 1; } It convert to below code final case class I( variable: _root_.scala.Double = 0.0, ) but ...
Panida Yimsanga's user avatar
0 votes
0 answers
117 views

How to automatically parse out the fields(Protobuf) used in the code?

Given the following trade.proto file: message Trade { message ProductInfo { optional uint64 product_id = 1; optional String product_name = 2; repeated int other_field = 3; } ...
Birkety's user avatar
1 vote
1 answer
311 views

Is there a way to get all possible protobuf Enum values using scalapb?

I have a protobuf enum like enum MyEnum { A = 0; B = 1; C = 2; } At runtime, I want to loop over all possible values for the enum like this: MyEnum().uniqueValues.forEach(println) How might I do ...
tSchema's user avatar
  • 193
0 votes
1 answer
563 views

How to convert binary protobuf file to json file in Scala?

In my project I have proto file, the respective class files also. I have probuf binary data as blob file format. How can I convert this file to json file? I am very new to Scala. I came across https://...
Prajwal_7's user avatar
  • 119
-1 votes
1 answer
157 views

How to avoid a copy of array when parsing a ByteString with ScalaPB

Given bs, an instance of com.google.protobuf.ByteString. What is the best way to parse from it I have tried Foo.parseFrom(bs.toByteArray) Foo.parseFrom(bs.newInput) Surprisingly, a JMH benchmark ...
Yann Moisan's user avatar
  • 8,269
0 votes
1 answer
803 views

google ads api doesn't return rows with null columns

Migrating from AdWords to GoogleAds api. Querying search_term_view: val googleAdsClient: GoogleAdsClient = GoogleAdsClient.newBuilder() .setCredentials(credential) .setDeveloperToken(...
Taras Kondratiuk's user avatar
0 votes
1 answer
749 views

How to share .proto (protobuf) files using a shared scala library using sbt

I have a few apps using shared .proto files. Each app's repo currently contains a copy of the files, which is not ideal and has recently created a problem when they accidentally diverged. I would like ...
ringo's user avatar
  • 18
-1 votes
3 answers
2k views

Import "google/protobuf/wrappers.proto" was not found scala

I have a .proto file which Imports google/protobuf/wrappers.proto while I run Scalapbc to generate the relevant scala code out of it it gives Import google/protobuf/wrappers.proto not found error. as ...
san's user avatar
  • 1
0 votes
1 answer
2k views

convert ByteArray to String to ByteArray

I want to convert ByteArray to string and then convert the string to ByteArray,But while converting values changed. someone help to solve this problem. person.proto: syntax = "proto3"; ...
Vasanth Vel's user avatar

15 30 50 per page
1
2 3 4 5
9