spark-avro Questions

1

Solved

I have a use case where I want to convert a struct field to an Avro record. The struct field originally maps to an Avro type. The input data is avro files and the struct field corresponds to a fiel...
Flabellum asked 16/9, 2020 at 17:30

1

I'm pushing a stream of data to Azure EventHub with the following code leveraging Microsoft.Hadoop.Avro.. this code runs every 5 seconds, and simply plops the same two Avro serialised items 👍🏼: ...

3

Solved

Unable to send avro format message to Kafka topic from spark streaming application. Very less information is available online about avro spark streaming example code. "to_avro" method doesn't requi...
Fryer asked 26/12, 2019 at 10:37

3

Solved

this works with parquet val sqlDF = spark.sql("SELECT DISTINCT field FROM parquet.`file-path'") I tried the same way with Avro but it keeps giving me an error even if i use com.databricks.spar...
Triennial asked 26/9, 2017 at 19:20

3

Solved

I'm trying to use the spark-avro package as described in Apache Avro Data Source Guide. When I submit the following command: val df = spark.read.format("avro").load("~/foo.avro") I get an error...
Verlaverlee asked 26/4, 2019 at 18:16

2

Solved

I like to use the same record type in an Avro schema multiple times. Consider this schema definition { "type": "record", "name": "OrderBook", "namespace": "my.types", "doc": "Test order updat...
Matriarch asked 4/1, 2018 at 17:31

2

Solved

I'm trying to run a spark stream from a kafka queue containing Avro messages. As per https://spark.apache.org/docs/latest/sql-data-sources-avro.html I should be able to use from_avro to convert c...
Tendril asked 6/3, 2019 at 15:25

2

I am looking to build a Spark Streaming application using the DataFrames API on Spark 1.6. Before I get too far down the rabbit hole, I was hoping someone could help me understand how DataFrames de...
Coelenterate asked 16/12, 2016 at 23:18

1

Solved

I have a code to convert my avro record to Row using function avroToRowConverter() directKafkaStream.foreachRDD(rdd -> { JavaRDD<Row> newRDD= rdd.map(x->{ Injection<GenericRecord...
Rehearse asked 16/2, 2018 at 13:40

3

Solved

I am using spark 1.6 and I aim to create external hive table like what I do in hive script. To do this, I first read in the partitioned avro file and get the schema of this file. Now I stopped here...
Ashur asked 27/7, 2016 at 16:51

1

I'm trying to switch from reading csv flat files to avro files on spark. following https://github.com/databricks/spark-avro I use: import com.databricks.spark.avro._ val sqlContext = new org.apach...
Cigarillo asked 20/4, 2016 at 10:39
1

© 2022 - 2024 — McMap. All rights reserved.