Hi,
Is there any way to add Policy Tags on external tables in BigQuery?
@ms4446 is this one you can help with? 🤞
Unfortunately, you cannot directly add Policy Tags to standard external tables in BigQuery. While you still cannot directly add Policy Tags to standard external tables in BigQuery, there are ways to achieve control over the data using the methods below. The primary reason is that BigQuery doesn't directly manage the data and the underlying storage system.
Workarounds and Best Practices:
Authorized Views: The most common and recommended approach is to leverage authorized views. Here's how:
BigLake Tables: For more seamless integration and advanced security features, consider using BigLake tables. BigLake:
Source-Level Permissions: Always remember that a fundamental layer of security lies within the storage system itself (e.g., Google Cloud Storage). Use IAM roles and permissions to control access at the data source.
Important Considerations:
@dellaC ,
Even with external tables pointing to Cloud Storage, directly applying policy tags to the columns of these tables in BigQuery is still not supported. BigQuery's policy tags are designed primarily for data fully managed within the BigQuery environment.
Unfortunately, Google Cloud Storage doesn't offer native columnar control in the same way that BigQuery does. Here's why:
Again, below are alternative approaches:
BigQuery: If possible, loading your Cloud Storage data into BigQuery (even temporarily for analysis) would allow you to leverage all the benefits of columnar storage and policy tags for fine-grained access control.
BigLake: For a more unified data lake approach, BigLake allows you to work with external data sources (including Cloud Storage) almost like native BigQuery tables and apply column-level policy tags directly.
@ms4446 We are using Apache Iceberg BQ tables with BQMS. Data is getting stored to GCS buckets. Do we have an option to use Policy tag, description and partition enforce on these external tables?
Please provide guidance on it.