Skip to content

docs/website: Improve partial evaluation / data filtering documentation#8625

Open
mmzzuu wants to merge 2 commits into
open-policy-agent:mainfrom
mmzzuu:feature/8316-improve-docs-partial-eval
Open

docs/website: Improve partial evaluation / data filtering documentation#8625
mmzzuu wants to merge 2 commits into
open-policy-agent:mainfrom
mmzzuu:feature/8316-improve-docs-partial-eval

Conversation

@mmzzuu
Copy link
Copy Markdown
Contributor

@mmzzuu mmzzuu commented May 8, 2026

Why the changes in this PR are needed?

The issue #8316 outlines that the Partial Evaluation / Data Filtering documentation could benefit from clearer examples and explanations to better enable users to get started adopting the feature.

What are the changes in this PR?

  • added a simple data filtering example to the filtering overview page to better showcase its purpose
  • explained the metadata annotation for unknowns and how it links to the database table and field names
  • added a tutorial page to provide a quick walkthrough

* added a simple data filtering example to the filtering overview page to better showcase its purpose
* explained the metadata annotation for unknowns and how it links to the database table and field names
* added a tutorial page to provide a quick demo

Fixes: open-policy-agent#8316
Signed-off-by: Manuela Züger <manuela.zueger@ipt.ch>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit a17069f
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/69fdfc4dbd84480008e20eff
😎 Deploy Preview https://deploy-preview-8625--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

references: open-policy-agent#8316
Signed-off-by: Manuela Züger <manuela.zueger@ipt.ch>
@srenatus
Copy link
Copy Markdown
Contributor

Hmm looks like the netlify preview is broken here? 😞 Thanks for contributing, I'll have a look in a bit! 🎉

```rego title="policy.rego"
package filters

# METADATA
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This metadata comment is in a bit of a strange place? Did you mean to use the package scope?

:::

## What is Partial Evaluation?
## What is Partial Evaluation? {#what-is-partial-evaluation}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if this was needed? the generated fragment looks to be the same?


The rule is: Directors may see the salaries of employees in their own department. When Alice (Engineering Director) lists employees, the highlighted rows are what she should see:

<table>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use markdown tables too, might be easier to read for future editors.

}
```

¹ The value of `input.employees.department` is _unknown_ during partial policy evaluation — it refers to a table column in the database.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't tend to use this format for notes. I think a bullet list is fine, but we can also use [^1], [^2] etc.

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

Successfully merging this pull request may close these issues.

3 participants