Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-record basis schema registry subject name for writing to Kafka #188

Open
brunolaporais opened this issue Feb 18, 2021 · 5 comments
Open
Labels
question Further information is requested

Comments

@brunolaporais
Copy link

Spark allows creating a column named topic to define a per-record basis topic.

The destination topic for the records of the DataFrame can either be specified statically as an option to the DataStreamWriter or on a per-record basis as a column named “topic” in the DataFrame. (Source)

I need to use the same strategy for the schema registry subject name. Does ABRiS support it?

Thanks!

@cerveada cerveada added the question Further information is requested label Feb 19, 2021
@cerveada
Copy link
Collaborator

No, currently you must specify the schema when you are creating the from_avro / to_avro expression. The Only exception to that is the schema that is downloaded using the confluent id at the start of the message.

@cerveada
Copy link
Collaborator

I am not sure if I understand the use case. All the rows in the data frame must have the same spark type right? Shouldn't they have the same avro type/schema as well?

@brunolaporais
Copy link
Author

You got it. The rows have the same schema.
However, some records should be published for their specific topic, hence, distinct subject names are used (internal reasons).

As I said, the topic per-record basis is supported by Spark (Source).

@cerveada
Copy link
Collaborator

I understand, but sorry that is not supported.

@brunolaporais
Copy link
Author

No problem.
Indeed, this issue can be converted to future improvements.
Thanks @cerveada. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants