[Feature Request]: User-facing API for defining schema/field options on user types
Open
core
new feature
P2
python
schemas
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
### What would you like to happen?
We should have a user-facing API for defining beam schema options on user types. One concept might be a `@beam_option` decorator that can be applied to a class (schema-level metadata) or an attribute (field-level metadata).
```py
@beam_option("my_flag")
@beam_option("my_metadata", 123)
class MyRowType(NamedTuple):
@beam_option("my_field_flag")
foo: int
@beam_option("my_metadata", 456)
bar: str
```
### Issue Priority
Priority: 2
### Issue Component
Component: sdk-py-core
Contributor guide
Assessment
This issue has not been assessed yet.