-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Open
Copy link
Labels
Description
We received user feedback on the Partial Evaluation documentation that the examples could be improved, but not much detail beyond that.
While the example on the page isn't incorrect, we could improve the page's context. The current document is more policy-focused and could benefit from more info on why a user would need Partial Evaluation and how they would practically use it. E. g. some ideas:
- Include an introductory section explaining the motivation for using Partial Evaluation, what does it actually solve.
- Add CLI Examples: Add some
opa evalcommand-line examples. This would allow users to try out the concepts as they read. - Add SDK Examples: Provide code snippets showing how to perform partial evaluation programmatically using the OPA Go SDK.
- Since this is one of the main pages that users will land on for data filtering it might be better to have an example that shows how Rego translates into SQL (with examples that show the two side-by-side) rather than walking through how PE works and then showing the SQL example at the very end.
- The example at the top of the page has a lot going on. METADATA, unknowns, implicitly the input.products and input.users documents are meant to refer to tables in a database, but that's not explained
- The way iteration/exists is expressed is a bit idiosyncratic (i.e., it's based on who the translation is implemented today...)
- This example might be easier to understand in the context of an application that needs such a feature.
Open to any other ideas too, please discuss on issue if interested In working on this as it's a technical topic and we need to make sure we have a clear plan.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog