question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use arbitrary AVRO schema file with datagen

See original GitHub issue

Line https://github.com/confluentinc/kafka-connect-datagen/blob/0.1.x/src/main/java/io/confluent/kafka/connect/datagen/DatagenTask.java#L120 does not allow to use an arbitrary AVRO schema file at say /avro/product.avsc

Might want to use getClass().getResourceAsStream(schemaFilename) instead…

Java docu:

The methods in ClassLoader use the given String as the name of the resource without applying any absolute/relative transformation (cf. the methods in Class). The name should not have a leading “/”.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:39 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
C0urantecommented, Apr 20, 2020

That’s great to hear! Glad I could help 😃

1reaction
elabbassiwidadcommented, Apr 20, 2020

If you’re running the connector inside a docker container, you need to copy the schema file into that container. If you’re using this docker-compose file, that’d be the container named connect.

Finally, it worked, thank you so much, i placed it in the broker and the schema registry containers before, but didn’t think it needed to be placed in the connect container, thank you again i’ve been stuck with this problem for more than 5 days

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avro Schema Serializer and Deserializer
This document describes how to use Avro schemas with the Apache Kafka® Java client ... Platform 5.5.0, Schema Registry now supports arbitrary schema...
Read more >
Why can't avro take the schema from the .avro file?
Avro requires two schemas for resolution - a reader schema and a writer schema. The writer schema is included in the file.
Read more >
Apache Avro 1.7.7 Getting Started (Python)
The schema we're using. The DataFileWriter needs the schema both to write the schema to the data file, and to verify that the...
Read more >
Kafka, Avro and Schema Registry | Microcks.io
Here is below a fragment of AsyncAPI specification file that shows the important things to notice when planning to use Avro and Microcks...
Read more >
File formats that are supported by Db2 Big SQL - IBM
You can specify the Avro schema as parameters to an Avro SerDe. You can use table properties to include an Avro file format,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found