Adzz / data_schema

Declarative schemas for data transformations.
Apache License 2.0
85 stars 9 forks source link

Schemaless Schemas #1

Closed Adzz closed 2 years ago

Adzz commented 2 years ago

Allow for schemaless schemas - ie schemas that are just the tuple based representation.

~This should be relatively simple.~

The tricky bit is how to allow for inline schemas that have has_many / has_one. The syntax is not particularly nice and we need a way to provide a data_accessor. Arguably it should use the data accessor of the "parent" - ie the accessor that is passed in when call to_struct initially.

Lots of branching options here... because the number of ways you can provide a struct is... a lot.

I like the idea of being able to turn some data into an existing struct without having to add code into that struct's module - like a data_accessor. That would allow for one struct to work in many different schemas.

Adzz commented 2 years ago

closed in #7