Tag Reconcile Loader Configuration¶
Goal¶
This guide explains how to configure the BigQuery connector to automatically reconcile tags between the BigQuery connector and Apache Ranger.
- Service Tag Reconciliation: Reconciles tags between the BigQuery connector and Apache Ranger
- Ranger Tag Reconciliation: Reconciles tags between Ranger/Portal and BigQuery, ensuring tags and their column mappings remain synchronized
Prerequisites¶
Before you begin, ensure the following:
- Privacera Manager is installed and the base installation is operational.
- The BigQuery connector is configured and running.
- Apache Ranger is properly configured and accessible.
Tag Masking Requirement
These tag reconciliation loader properties will only work if tag masking is enabled in the connector.
Service Tag Reconciliation¶
Overview¶
Service Tag Reconciliation maintains tag consistency between your BigQuery connector and Apache Ranger by:
- Monitoring tag differences: Compares tags loaded by the connector with those present in Ranger
- Automatic reconciliation: Creates missing tags in Ranger or removes orphaned tags
- Configurable intervals: Runs at specified intervals to ensure ongoing consistency
Service Tag Reconcile Loader Properties:
| Property Name | Description | Default Value | Supported Values |
|---|---|---|---|
| CONNECTOR_BIGQUERY_TAG_RECONCILE_LOADER_ENABLED | Enable or disable the service tag reconcile loader functionality | true | true, false |
| CONNECTOR_BIGQUERY_SERVICE_TAG_RECONCILE_SYNC_INTERVAL | Set the interval for service tag reconcile sync process in seconds | 540 | Any numeric value in seconds |
Configuration Steps¶
Warning
- Enabling this feature will automatically create and delete tags in Ranger based on connector data.
- Lower interval values result in more frequent reconciliation but may increase system load.
- Be sure to replace the example values with your actual configuration values.
Restart Required
Any changes to these properties require a restart of the BigQuery connector application for the updates to take effect.
-
Navigate to Settings → Applications in the Self-Managed Portal.
-
Select BigQuery from the list of Connected Applications.
-
Click on the application name or the icon, then click on Access Management → ADVANCED tab.
-
To update the tag reconcile sync interval, add the following property under the
Add New Custom Propertiessection:Bash -
To disable the tag reconcile loader, add the following property under the
Add New Custom Propertiessection:Bash -
Click 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.Bash -
To update the tag reconcile sync interval, add or modify the following property:
-
To disable the tag reconcile loader, add or modify the following property:
-
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.
-
In PrivaceraCloud, navigate to Settings → Applications.
-
Select BigQuery from the list of Connected Applications.
-
Click on the application name or the icon, then click on Access Management → ADVANCED tab.
-
To update the tag reconcile sync interval, add the following property under the
Add New Custom Propertiessection:Bash -
To disable the tag reconcile loader, add the following property under the
Add New Custom Propertiessection:Bash -
Click SAVE.
-
Once saved and enabled, the BigQuery connector will start. You can hover on the VIEW LOGS button to check the status, either Running or Stopped.
Note
Perform the following steps only if the connector does not reflect the updated configuration and requires a restart.
Restart the BigQuery Connector:
-
Go to Settings → Applications → select the BigQuery connector application.
-
Edit the application → Disable it → and Save it.
-
Open the same application again and then: Enable it and Save it.
Ranger Tag Reconciliation¶
Overview¶
Ranger Tag Reconciliation ensures tags and their resource mappings (column-level policy tags) remain synchronized between Ranger/Portal and BigQuery. This advanced reconciliation feature:
- Detects missing tags: Identifies tags that exist in Ranger but were manually deleted from BigQuery
- Recreates tags automatically: Restores deleted policy tags in BigQuery Data Catalog
- Restores tag mappings: Automatically reapplies column-level tag mappings for recreated tags
- Monitors existing mappings: Checks if tag-resource mappings were manually removed from BigQuery columns and reapplies them
- Prevents drift: Ensures Ranger remains the authoritative source for tag definitions and mappings
Ranger Tag Reconciliation Properties:
| Property Name | Description | Default Value | Supported Values |
|---|---|---|---|
| CONNECTOR_BIGQUERY_RANGER_TAG_RECONCILE_ENABLE | Enable or disable Ranger tag reconciliation functionality | false | true, false |
| CONNECTOR_BIGQUERY_RANGER_TAG_RECONCILE_INTERVAL_SEC | Set the interval for Ranger tag reconciliation process in seconds | 420 | Any numeric value in seconds (default: 7 minutes) |
| CONNECTOR_BIGQUERY_RANGER_TAG_RECONCILE_AT_RESTART_ENABLE | Run reconciliation immediately at connector startup | false | true, false |
Configuration Steps¶
Important Considerations
- This feature focuses on tag creation and restoration only - it does not delete tags from BigQuery
- Ranger is the authoritative source of truth for all tag definitions and mappings
- Lower interval values result in faster recovery but may increase system load and API calls to BigQuery
- Both normal (flat) and hierarchical policy tag structures are supported
- Be sure to replace the example values with your actual configuration values
Restart Required
Any changes to these properties require a restart of the BigQuery connector application for the updates to take effect.
-
Navigate to Settings → Applications in the Self-Managed Portal.
-
Select BigQuery from the list of Connected Applications.
-
Click on the application name or the icon, then click on Access Management → ADVANCED tab.
-
To enable Ranger tag reconciliation, add the property under Add New Custom Properties, update the index based on the connector you are configuring :
Bash -
To update the reconciliation interval (optional), add the following property:
Bash -
To enable reconciliation at connector restart (optional), add the following property:
Bash -
Click 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.Bash -
To enable Ranger tag reconciliation, add or modify the following property:
-
To update the reconciliation interval (optional), add or modify the following property:
-
To enable reconciliation at connector restart (optional), add or modify the following property:
-
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.
-
In PrivaceraCloud, navigate to Settings → Applications.
-
Select BigQuery from the list of Connected Applications.
-
Click on the application name or the icon, then click on Access Management → ADVANCED tab.
-
To enable Ranger tag reconciliation, add the property under Add New Custom Properties, update the index based on the connector you are configuring :
Bash -
To update the reconciliation interval (optional), add the following property:
Bash -
To enable reconciliation at connector restart (optional), add the following property:
Bash -
Click SAVE.
-
Once saved and enabled, the BigQuery connector will start. You can hover on the VIEW LOGS button to check the status, either Running or Stopped.
Note
Perform the following steps only if the connector does not reflect the updated configuration and requires a restart.
Restart the BigQuery Connector:
-
Go to Settings → Applications → select the BigQuery connector application.
-
Edit the application → Disable it → and Save it.
-
Open the same application again and then: Enable it and Save it.
Use Cases¶
Scenario 1: Tag Accidentally Deleted from BigQuery
- A policy tag is manually deleted from BigQuery Data Catalog
- Ranger tag reconciliation detects the missing tag on next cycle
- The tag is automatically recreated in BigQuery
- All column mappings that previously had this tag are automatically restored
Scenario 2: Column Tag Manually Removed
- A user removes a policy tag from specific columns in BigQuery (tag still exists)
- Ranger tag reconciliation detects the missing column mapping
- The tag is automatically reapplied to those columns
Monitoring¶
You can monitor the reconciliation process through connector logs. Look for these log messages:
Comparison: Service Tag vs Ranger Tag Reconciliation¶
| Aspect | Service Tag Reconciliation | Ranger Tag Reconciliation |
|---|---|---|
| Direction | BigQuery → Ranger | Ranger → BigQuery |
| Purpose | Sync connector-discovered tags to Ranger | Sync Ranger tags to BigQuery |
| Source of Truth | BigQuery Connector | Ranger/Portal |
| Tag Creation | Creates tags in Ranger | Creates policy tags in BigQuery |
| Tag Deletion | Can delete orphaned tags from Ranger | Does not delete tags |
| Resource Mappings | N/A | Handles column-level tag mappings |
| Typical Use Case | Initial tag discovery and sync | Disaster recovery, manual deletion protection |
| Default State | Enabled | Disabled |
| Interval | 540 seconds (9 minutes) | 420 seconds (7 minutes) |
Best Practice
Enable both reconciliation types for comprehensive tag management:
- Service Tag Reconciliation: Keeps Ranger updated with tags discovered from BigQuery
- Ranger Tag Reconciliation: Ensures BigQuery reflects all tags defined in Ranger and protects against manual deletions
- Prev topic: Advanced Configuration