Note that this is a preproduction feature that is available to preproduction Tenants.
This guide explains how Native Policies work in the Platform for Google BigQuery: the Native tab, the Protected Resource sub-tab, and how you deploy changes to BigQuery through Vendor Compare. This content applies to both Row-level Policies and Column-level Policies.
For the JSON structure and field-level detail specific to each Policy type, and for how to view, create, and deploy each one, see:
Google BigQuery Row-level Support
Google BigQuery Column-level Support
BigQuery syntax, supported expressions, and limitations can change independently of the Platform. Always consult the Google BigQuery documentation for the current list of valid supported syntaxes and limitations before you deploy a Native Policy.
Related Articles:
Creating Policies
Managing Policies
Google BigQuery POP Setup
Google BigQuery Row-level Support
Google BigQuery Column-level Support
Managing Native Policies
A Native Policy has four top-level tabs: Details, Native, Vendor Compare, and Audit. You edit the JSON structures for your Policy type and link the Policy to its BigQuery resources under the Native tab, which has two sub-tabs: Native Code and Protected Resource.
To open the Native Code of your Policy:
- In your Policies Workspace, select the relevant Policy.
- Click the Native tab at the top of the page.
- Confirm the Native Code sub-tab is selected.
- Click Edit.
- See Google BigQuery Row-level Support or Google BigQuery Column-level Support for example inputs.
- Click Save.
You can add // style inline comments inside the JSON code boxes to leave guidance or notes for other Policy editors. The Platform strips these comments before it deploys the code, so they never reach BigQuery or affect the Vendor Policy.
Protected Resource
The Protected Resource sub-tab, next to Native Code, is where you link the Policy to the actual BigQuery resource it governs.
- Under Asset Types, click Add Asset Type and choose a type, for example BigQuery Table.
- Under the Asset Type, add the specific Asset: the table for a Row-level Policy, or the tagged column for a Column-level Policy.
- Under Applications, link the connection, for example a BigQuery application connection, that the Platform uses to reach the resource.
The Asset you link here must match the resource identified in the Native Code's General section (datasetId, projectId, and tableId, or the equivalent Policy Tag reference for a Column-level Policy). If the two don't point at the same resource, the Policy can't deploy correctly.
Deploying Native Policy changes to BigQuery
Saving a Policy's Native Code or Protected Resource doesn't push the change to BigQuery. You deploy changes from the Policy's Vendor Compare tab.
To deploy your changes:
- Click the Vendor Compare tab on the Policy. If the Platform and BigQuery are out of sync, this tab shows a warning icon.
- The Platform shows your edited version, Platform Policy, side by side with the current BigQuery configuration, Vendor Policy, under Compare Code. Both sides break into the same sections: General, Policy Core Logic, Linked Identities (Row-level) or Identities Filter (Column-level), and Assets Info.
- The Platform highlights the values that differ between Platform Policy and Vendor Policy, including any mismatch in the linked Protected Resource.
- Review each highlighted section, then choose one:
- Accept Platform Changes: deploys your Platform edits to BigQuery and overwrites the Vendor Policy.
- Accept Vendor Changes: pulls the current BigQuery configuration into the Platform and discards your Platform edits.
- Use Collapse All to collapse every section so you can scan for diffs faster before you decide.
For more information, see Vendor Compare.
Accept Platform Changes and Accept Vendor Changes apply to the whole Policy, not to individual sections. Review every different section before you choose one.