Open ronpandolfi opened 4 years ago
Do you have a use case for this? I think part of the reason I hadn't put this in initially is that I didn't really have one in mind.
Would you wnat a static type be available in any location (event, start, configuration)?
The static option is already in the schema, there's just no way to add a value. I know @tacaswell had some use cases in mind as well, but it makes sense as a trivial case when you want to add a value without having to extend the descriptor and insert it into an event.
I think the idea was more to include the value directly in the projection, something like:
{'name': 'intent',
'version': '0.1.0',
'projection':
{f'intent_type': {'type': 'static',
'value': 'PlotIntent'},
f'name': {'type': 'static',
'value': 'q vs I'},...}}
Thanks. Would it be sufficient to define the value fields as a string in the schema?
I'd prefer it be Any. I have a few other types I'm already inserting here (dict, list).
Committed a fix into PR #192 . Will want something to support it in the databroker.projector
The projection schema is missing a 'value' property when using the 'static' type.