Table-policy associations

Cloudera Lakehouse Optimizer maintains table-policy association data so you can associate policies with Iceberg tables, namespaces, or catalogs.

Use REST APIs to associate policies at table, namespace, or catalog scope. After you define the policies using REST APIs for the first time, you must run the POST /policies/{policyName}/tables/{tableName}/subs API so that the Cloudera Lakehouse Optimizer modifies or appends the mapping of the Iceberg tables to the policies in the association file. You must run the PUT /policies/{policyName}/tables/{tableName}/subs API for subsequent associations.

Alternatively, to do a bulk-update of table-policy associations, you must download the existing file which you can update and then upload. If the file does not exist, create a JSON file, update it as required, and upload it using the PUT /policies/resource API.
The following example shows an entry in the association file:
{
“Catalog_sales” : [“snapshot”, “manifests_orphan”, “compact”] //Catalog_sales is the Iceberg table name.
}