Comments (12)
@fxn Hey, sorry for a long pause, got a bit sick. I might know what you mean. A type lookup over different files. I think avro_turf
gem even allows you to split one schema into multiple files and assemble them into one for registration in a registry.
Let me try to fix it 🔥
from avrora.
Answering question
Is there a way to get that working?
Yes, you need to add schema definition of EventType
to Event
schema (at least once, better to the most top place of usage)
And may I ask you to post a sample of those maybe without extra fields, to get how you try to use it?
from avrora.
Wait, perhaps I am looking for something that doesn't square with Avro.
If you embed the type definition as you do in this fixture for io.confluent.Message
, but in a different type you also have something of type io.confluent.Message
, you have to duplicate the type definition there?
from avrora.
Guess I was using that feature in avro_turf
without even noticing :).
from avrora.
@fxn Exactly, it works magically behind the scenes in avro_turf
. I was postponing this feature till the last, but now I have an additional reason to work on it 😜
from avrora.
@fxn Good news, I manage to have a working draft, but with some differences from avro_turf
end-result (compiled schema is more standardized than in ruby). I hope to publish something you can try in the closest weekends ✌️
from avrora.
That's awesome ❤️.
from avrora.
@fxn Hey, it took me a while (a bit of family travelling 🌴), but here you can check not fully finished (few optimizations are missing) inter-schema refefences feature #18
The not-so-optimal part is a N-read of the reference if it's reused in different schemas (so IO on a first read) but rest should work. Can you try it and give feedback?
Only one important thing – reference should be a full name = namespace + name
, i.e
{
"namespace": "io.confluent",
"type": "record",
"name": "Messenger",
"fields": [
{
"name": "messages",
"type": {
"type": "array",
"items": "io.confluent.Message" // <--- full name reference (namespace + name)
}
}
]
}
from avrora.
Hola @fxn, a new release with inter-schema references (now complete version) was published https://github.com/Strech/avrora/releases/tag/v0.8.0
Any feedback appreciated! Happy coding ❤️
from avrora.
Sorry for not responding earlier, thanks a lot for working on this, I'll run some tests and wil write back!
from avrora.
Modulus Christmas break, I have been using 0.8.0 since it was released without any issues. Have checked some cross-references to records and enums.
Thanks for working on this ❤️.
from avrora.
@fxn Woohooo, great news 😂
from avrora.
Related Issues (20)
- Empty user-agent in header when calling registry
- schema evolution support HOT 7
- hook to skip certain fields. HOT 2
- Fix warnings introduced in elixir 1.15 HOT 2
- logicalType: date HOT 5
- Telemetry support HOT 4
- Schema storage and reference lookup
- Confluent Schema Registry references
- Warnings on compilation HOT 4
- Maintain a CHANGELOG? HOT 5
- Dialyzer issues with private clients HOT 2
- "Messages encoded with OCF are wrapped in a List" what for? HOT 1
- Allow 3 named types to be used as root schemas
- Get schema name on decode HOT 3
- Add deprecation warning for encode with plain format
- Private clients hardcode schemas path at compile time HOT 6
- Any way to configure the registry_url at startup? HOT 8
- Option for decoding with tagged union values HOT 7
- unnamed_type error with primary type schema HOT 11
- Add option to enable SSL verification of registry requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avrora.