Search code examples
google-cloud-platformgoogle-cloud-dlpgoogle-data-catalog

How to filter GCP Data Catalog entries with a specific tag value via console?


I ran a DLP job saving results to Data Catalog and would like to filter the entries in Data Catalog where the standard tag template (Data Loss Prevention Tags) has a value Contains DLP findings: true. I know how to do it with the API. But is there a way to filter out by tag values via Console UI?


Solution

  • Yes, there is a way to filter out by tag values via the Data Catalogs Console using the search box. The below syntax can be used to achieve the results:

    tag:<project_name>.tag_template_name.key:value
    

    As per your requirement, the below query would work:

    tag:<project_name>.data_loss_prevention.has_findings=true
    

    The above query can be broken down as follows:

    1. <project_name> (It is optional)
    2. data_loss_prevention (tag_template_name of "Data Loss Prevention Tags")
    3. has_findings (ID of "Contains DLP findings"). For every Display name, there should be an ID. The ID of the "Display name" from the “View tag template” should be used instead of the Display name as the key during search. enter image description here
    4. = - Choose the <operator> based on the data type.
      • string: ":" Note: The colon in this string search denotes an exact token match, not a substring.
      • boolean and enum: "="
      • double: "=", "<", ">", "<=", ">="
      • timestamp: ":", "=", "<", ">", "<=", ">="
    5. true (The value of “Contains DLP findings”)