avro Questions

3

Solved

I have this exception in the consumer when trying to cast the record.value() into java object : ClassCastException: class org.apache.avro.generic.GenericData$Record cannot be cast to class [...].Pu...
Dominickdominie asked 30/1, 2022 at 21:38

3

Solved

For Maven there is an official Avro plugin to generate Java classes from Avro schemas. However, for Gradle there exists no official plugin. There is davidmc24/gradle-avro-plugin, but it is no longe...
Watertight asked 5/1, 2023 at 7:53

3

I have been reading a lot about Apache Avro these days and I am more inclined towards using it instead of using JSON. Currently, what we are doing is, we are serializing the JSON document using Jac...
Hendiadys asked 15/9, 2013 at 3:26

10

Solved

I need to use the Confluent kafka-avro-serializer Maven artifact. From the official guide I should add this repository to my Maven pom <repository> <id>confluent</id> <url&g...
Tunicate asked 19/4, 2017 at 7:10

1

Scenario I create an eventhub on Jan 1st 2018. My eventhub retention period is set to be 1 day. I enable the "capture", leaving the default capture parameters of every 5 mins or 300 mb, feature ...
Married asked 22/10, 2018 at 10:33

1

I have these two avsc files, the first makes a reference to the second but when trying to compile using avrogen an error is returned and the schema is not generated. Error: Exception occurred. Und...
Tudela asked 16/9, 2021 at 15:4

1

Solved

I am building a Kafka Listener / Consumer with Spring Boot that consumes Avro data from a topic. Here's some of the properties spring.kafka.properties.specific.avro.reader=true spring.kafka.consume...

3

As per the definition of "default" attribute in Avro docs: "A default value for this field, used when reading instances that lack this field (optional)." This means that if the corresponding fiel...
Flitting asked 26/2, 2018 at 9:59

2

I am taking samples from a Bayesian statistical model, serializing them with Avro, uploading them to S3, and querying them with Athena. I need help writing a query that unnests an array in the tab...
Alumina asked 27/1, 2018 at 2:51

4

Solved

Apache Avro provides a compact, fast, binary data format, rich data structure for serialization. However, it requires user to define a schema (in JSON) for object which need to be serialized. In ...
Keown asked 9/4, 2014 at 6:18

4

Solved

I get the following error when I want to send an AVRO message which contains a field that has the type long: Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing A...
Passed asked 18/12, 2017 at 11:48

3

Solved

According to this question on nesting Avro schemas, the right way to nest a record schema is as follows: { "name": "person", "type": "record", "fields": [ {"name": "firstname", "type": "string...
Rawlinson asked 28/11, 2016 at 22:19

4

Is it possible to have an optional field in an Avro schema (i.e. the field does not appear at all in the .JSON file)? In my Avro schema, I have two fields: {"name": "author", "type": ["null", "st...
Cresset asked 27/3, 2015 at 11:25

2

Solved

I'm trying to get my head around on extracting attributes from Avro and JSON. I'm able to extract attributes from JSON by using EvaluateJsonPath processor. I'm trying to do the same on Avro, but i'...
Klystron asked 27/2, 2017 at 22:7

2

Solved

I recently had a requirement where I needed to generate Parquet files that could be read by Apache Spark using only Java (Using no additional software installations such as: Apache Drill, Hive, Spa...
Wells asked 17/11, 2017 at 16:21

3

Solved

Avro schemas are defined using JSON. Schemas are composed of primitive types (null, boolean, int, long, float, double, bytes, and string) and complex types (record, enum, array, map, union, and fix...
Wag asked 5/7, 2016 at 21:28

5

I'm using Kafka schema registry for producing/consuming Kafka messages, for example I have two fields they are both string type, the pseudo schema as following: {"name": "test1", "type": "string"}...
Delegacy asked 12/4, 2018 at 15:57

4

Solved

I am receiving from a remote server Kafka Avro messages in Python (using the consumer of Confluent Kafka Python library), that represent clickstream data with json dictionaries with fields like use...
Jacquerie asked 7/6, 2017 at 8:45

4

I need to refer to this Student schema from inside another schema: { "type": "record", "namespace": "data.add", "name": "Student", &q...
Expiatory asked 27/11, 2019 at 12:22

5

A brief explanation of what I want to achieve: I want to do functional tests for a kafka stream topology (using TopologyTestDriver) for avro records. Issues: Can't "mock" schemaRegistry to automa...
Tusker asked 10/10, 2018 at 9:44

10

Solved

I'm using a Kafka Source in Spark Structured Streaming to receive Confluent encoded Avro records. I intend to use Confluent Schema Registry, but the integration with spark structured streaming seem...

7

I used avro-tools to generate java classes from avsc files, using: java.exe -jar avro-tools-1.7.7.jar compile -string schema myfile.avsc Then I tried to serialize such objects to json by Object...
Excise asked 6/9, 2016 at 13:4

3

Solved

We have a glue crawler that read avro files in S3 and create a table in glue catalog accordingly. The thing is that we have a column named 'foo' that came from the avro schema and we also have some...
Resplendent asked 10/12, 2019 at 13:47

3

Solved

There are at least two different ways of creating a hive table backed with Avro data: Creating a table based on an Avro schema (in this example, stored in hdfs): CREATE TABLE users_from_avro_schem...
Counterfoil asked 30/5, 2017 at 7:45

5

Solved

Some characteristics of Apache Parquet are: Self-describing Columnar format Language-independent In comparison to Apache Avro, Sequence Files, RC File etc. I want an overview of the formats. I ha...
Darwen asked 24/4, 2016 at 10:59

© 2022 - 2024 — McMap. All rights reserved.