Skip to content

Latest commit

 

History

History

basic_data_catalog_usage

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Basic Data Catalog Usage

This example illustrates showcase some of the basic data catalog features.

It will:

  • Create a tag template
  • Create an entry group
  • Create a tag using the tag template and assigning that to the entry group

Inputs

Name Description Type Default Required
tag_templates A list of tag template objects which include id, display_name and fields
list(object({ 
id = string
display_name = optional(string)
force_delete = optional(bool)
fields = list(object({
id = string
type = string
values = optional(list(string))
display_name = optional(string)
is_required = optional(bool)
order = optional(number)
}))
}))
n/a yes
project_id The project ID to host the tag templates in string n/a yes
region The region to host the tag templates in string n/a yes
entries A list of entry objects which include id, description and display_name
list(object({
id = string
entry_group_id = string
type = string
file_patterns = optional(list(string))
user_specified_system = optional(string)
linked_resource = optional(string)
schema = optional(string)
display_name = optional(string)
description = optional(string)
}))
[] no
entry_groups A list of entry group objects which include id, description and display_name
list(object({ 
id = string
display_name = optional(string)
description = optional(string)
}))
[] no
tags A list of objects which include id, tag_template_id and fields
list(object({ 
id = string
tag_template_id = string
parent = string
column = optional(string)
fields = list(object({
id = string
type = string
value = string
spec = optional(bool)
display_name = optional(string)
order = optional(number)
}))
}))
[] no

Outputs

Name Description
tag_template_names The name of the tag templates resource(s)
tag_template_self_links The URI of the tag template resource(s)

Example Usage

project_id = [YOUR PROJECT ID HERE]
region     = [YOUR REGION HERE]

tag_templates = [
  {
    id           = "my_template"
    display_name = "Demo Tag Template"
    force_delete = true
    fields = [
      {
        id   = "source"
        display_name = "Source of data asset"
        type = "STRING"
        is_required = true
      },
      {
        id   = "num_rows"
        display_name = "Number of rows in the data asset"
        type = "DOUBLE"
      },
      {
        id   = "pii_type"
        display_name = "PII type"
        type = "ENUM"
        values = [
          "EMAIL",
          "SOCIAL SECURITY NUMBER",
          "NONE"
        ]
      }
    ]
  }
]

entry_groups = [
  {
    id = "my_entry_group"
  }
]

tags = [
  {
    id              = "my_first_tag"
    tag_template_id = "my_template"
    parent          = "my_entry_group"
    fields = [
      {
        name  = "source",
        type  = "STRING",
        value = "oracle-db"
      },
      {
        name  = "num_rows"
        type  = "DOUBLE"
        value = "100"
      },
      {
        name  = "pii_type"
        type  = "ENUM",
        value = "NONE"
      }
    ]
  }
]

Notes

Tag Templates

  • The Tag Template ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and must start with a letter or underscore.
  • Must contain at least one field and at most 500 fields.
  • Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 64 characters long. Field IDs must also be unique within their template. Field IDs must start with a letter or underscore.
  • The valid values for type in the tag_templates object are; BOOL, DOUBLE, ENUM and STRING, and TIMESTAMP.
  • If you provide the ENUM type you are expected to provide a set of values. This set must not be empty and can include up to 100 allowed values. The display names of the values in this set must not be empty and must be case-insensitively unique within this set.

Entry Groups

Tags