Skip to content

support for complex avro schema #26

@melchoir55

Description

@melchoir55

It appears as if the library does not support complex avro schema. That is, avro schema which contain multiple classes referencing each other.

Take the following avro schema, for example:

[{
    "name": "Order",
    "namespace": "com.questanalytics.core",
    "type": "record",
    "fields": [{
        "name": "uid",
        "type": "int",
        "default": "NONE"
    }]
}, {
    "name": "Customer",
    "namespace": "com.questanalytics.core",
    "type": "record",
    "fields": [{
        "name": "uid",
        "type": "int",
        "default": "NONE"
    } {
        "name": "order",
        "type": "Order",
        "default": "NONE"
    }, {
        "name": "name",
        "type": "string",
        "default": "NONE"
    }]
}]

The above has a Customer who has embedded Order objects. Am I wrong in that this library will not allow a developer to work with a schema like this?

We are looking at the writeup here: https://marcosschroh.github.io/python-schema-registry-client/faust/ and it seems as if the faust integration assumes the schema is limited to a single class.

For example, it isn't clear how the following expression (taken from the writeup linked above) could possibly refer to a complex schema:

class UserModel(faust.Record, serializer='avro_users'):
    first_name: str
    last_name: str

It seems as if it assumes the schema contains one and only one class (User)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions