Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'value' property to projection schema on 'static' type #194

Open
ronpandolfi opened this issue Oct 12, 2020 · 5 comments
Open

Add 'value' property to projection schema on 'static' type #194

ronpandolfi opened this issue Oct 12, 2020 · 5 comments
Assignees

Comments

@ronpandolfi
Copy link
Contributor

The projection schema is missing a 'value' property when using the 'static' type.

@dylanmcreynolds
Copy link
Contributor

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)?

@ronpandolfi
Copy link
Contributor Author

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'},...}}

@dylanmcreynolds
Copy link
Contributor

Thanks. Would it be sufficient to define the value fields as a string in the schema?

@ronpandolfi
Copy link
Contributor Author

ronpandolfi commented Oct 13, 2020

I'd prefer it be Any. I have a few other types I'm already inserting here (dict, list).

@dylanmcreynolds
Copy link
Contributor

Committed a fix into PR #192 . Will want something to support it in the databroker.projector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants