Resource Sync Change Log¶
Configure the Databricks Unity Catalog connector to write resource-delta.log: one line for each resource that a resource sync changes, with what the connector decided, why, and what differed.
Overview¶
During a resource sync, the connector compares each resource it loads with the copy it stored, then adds, recreates, updates or deletes it. Use resource-delta.log when a sync changes more resources than expected, for example tables that are recreated and re-granted on every scheduled sync, to see which resources changed and why.
When CONNECTOR_DATABRICKS_UNITY_CATALOG_LOG_RESOURCE_DELTA_DETAILS_ENABLED is true, the connector writes one line for each resource that a scheduled or on-demand resource sync adds, recreates, updates, deletes or skips. Unchanged resources get no line, except a table whose created time changed while nothing else did.
resource-delta.log is a diagnostic: turn it on to investigate, and off again once you have the information you need.
Configuration properties¶
| Property | Description | Default |
|---|---|---|
CONNECTOR_DATABRICKS_UNITY_CATALOG_LOG_RESOURCE_DELTA_DETAILS_ENABLED | Writes one line to resource-delta.log for each resource that a resource sync changes. | false |
CONNECTOR_RESOURCE_DELTA_MAX_LOG_FILES | Number of rolled resource-delta.log files to keep. | 20 |
CONNECTOR_RESOURCE_DELTA_MAX_LOG_FILE_SIZE | Size at which resource-delta.log rolls to a new file. | 25MB |
Matching custom property (Self-Managed Portal):
| Custom property | Default |
|---|---|
ranger.policysync.connector.0.log.resource.delta.details.enabled | false |
The size of resource-delta.log can be set only with the Privacera Manager properties.
Setup¶
-
Navigate to Settings → Applications in the Self-Managed Portal.
-
From the list of Connected Applications, select Databricks Unity Catalog.
-
Select the application name or the icon to edit. Then, go to the Access Management tab.
-
Under the ADVANCED tab, under Add New Custom Properties, add:
Properties -
Select SAVE to apply the changes.
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to open the
.ymlfile to be edited.If you have multiple connectors, then replace
instance1with the appropriate connector instance name. -
Add or set the following properties. The two size properties are optional:
YAML Set this property in the
.ymlfileDo not add the matching custom property to
connector-custom.properties. The generated connector configuration already contains the key, and the first occurrence wins, so a value inconnector-custom.propertiesis ignored. -
Once the properties are configured, run the following commands to update your Privacera Manager platform instance:
Step 1 - Setup which generates the helm charts. This step usually takes few minutes.
Step 2 - Apply the Privacera Manager helm charts. Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.
Read resource-delta.log¶
The connector writes resource-delta.log in its log folder (/workdir/policysync/logs). Each line explains one resource:
| Text Only | |
|---|---|
| Field | Meaning |
|---|---|
decision | What the sync did with the resource (see the next table). |
reason | Why, for example NEW_RESOURCE, CREATED_TIME_NEWER, CREATED_TIME_NOT_A_RECREATE, CHANGED or NOT_IN_LOAD. |
loader | OFFLINE for a scheduled sync, ON_DEMAND for an on-demand event. |
changeLogId | The changelog of the resource sync that made the decision. |
resource | The resource type and name. |
createdTime | The loaded (new) and stored (saved) created time, and how they compare (check): SAME, NEWER, NOT_TRUSTED (newer, but not treated as a recreate; see Foreign Table Recreate Detection in Scheduled Syncs), OLDER_THAN_SAVED, UNKNOWN (not read) or SAVED_MISSING. |
source | Which read produced each created time for a foreign-catalog table: typically SHOW_TABLE_EXTENDED in a scheduled sync and DESCRIBE_TABLE_EXTENDED in an on-demand sync. |
changed | What differs between the stored and the loaded resource, with both values. |
| Decision | Meaning |
|---|---|
ADDED | New resource. |
RECREATED | The created time is newer and trusted: the resource was replaced and all its permissions re-applied. |
UPDATED | The stored resource was updated. Its stored created time is kept. |
CREATEDTIME_IGNORED_NO_CHANGE | The created time changed but was not treated as a recreate, and nothing else changed. Nothing was written. |
MIGRATED | The stored resource had no created time. It was filled in, with no permission changes. |
SKIPPED_STALE | A newer copy of the resource was stored while the sync ran. Nothing was changed. |
DELETED | The resource is no longer in the source and was removed. |
- Prev topic: Advanced Configuration