> For the complete documentation index, see [llms.txt](https://ibm-developer.gitbook.io/cloudpakfordata-telco-workshop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ibm-developer.gitbook.io/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md).

# Enterprise data governance for Admins using Watson Knowledge Catalog

This exercise demonstrates how to solve the problems of enterprise data governance using Watson Knowledge Catalog on the Cloud Pak for Data platform. We'll explain how to use governance, data quality and active policy management in order to help your organization protect and govern sensitive data, trace data lineage and manage data lakes. This knowledge will help users quickly discover, curate, categorize and share data assets, data sets, analytical models and their relationships with other members of your organization. It serves as a single source of truth for data engineers, data stewards, data scientists and business analysts to gain self-service access to data they can trust.

You will need the *Admin* role to create a catalog.

This section is comprised of the following steps:

1. [Set up Catalog and Data](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#1-set-up-catalog-and-data)
2. [Add collaborators and control access](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#2-add-collaborators-and-control-access)
3. [Add categories](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#3-add-categories)
4. [Add data classes](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#4-add-data-classes)
5. [Add Business terms](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#5-add-business-terms)
6. [Add rules for policies](/cloudpakfordata-telco-workshop/telco-workshop/watson-knowledge-catalog-admin.md#6-add-rules-for-policies)

## 1. Set up Catalog and Data

> NOTE: The default catalog is your enterprise catalog. It is created automatically after you install the Watson Knowledge Catalog service and is the only catalog to which advanced data curation tools apply. The default catalog is governed so that data protection rules are enforced. The information assets view shows additional properties of the assets in the default catalog to aid curation. Any subsequent catalogs that you create can be governed or ungoverned, do not have an information assets view, and supply basic data curation tools.

First we'll create a catalog and load some data

### Create the catalog

#### Provision Watson Knowledge Catalog the First Time

If you haven't yet started Watson Knowledge Catalog, you'll need to provision it.

* Open Watson Knowledge Catalog by clicking the *Services* icon at the top right of the home page:

![click services icon](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F6058f24b078a940551d6a92b1299b4f4f0678702.png?generation=1595273030657206\&alt=media)

* Under the *Data Governance* section, click on the *Watson Knowledge Catalog* tile:

![open wkc](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F3b055da9afb357b2cdb24083cb5cca392b2986e8.png?generation=1595273048656812\&alt=media)

#### Open Watson Knowledge Catalog

* Click open on the top-right corner to launch Watson Knowledge Catalog.

![open wkc](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F4cb0293d6b0788ec7cec7da7c682e08806d3ce8b.png?generation=1595273062432372\&alt=media)

* Go to the upper-left (☰) hamburger menu and choose `Organize` -> `All catalogs`:

![open catalog menu](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fa159b6bdc38c2603015777df9ba7021374302cca.png?generation=1595273060416471\&alt=media)

* From the *Your catalogs* page, click either `Create catalog` or `New Catalog`:

![create WKC catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F74f33efa8b041ce5d86000142f99c6d960ddda34.png?generation=1595273053063028\&alt=media)

* Give your catalog a name and optional description, check  `Enforce data protection rules` and click `create`:

![name and create wkc catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F59cb55208a09a5a4e39894d0a4ba8d7c5d5e6f84.png?generation=1595273001796204\&alt=media)

* Click `OK` on the pop-up that shows up when you checked the checkbox in the previous screen

![enforce data protection](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F38c00d09444f7b47417ba5d72738ce92808cd934.png?generation=1595273062714811\&alt=media)

### Option 1 - Add data assets

* Under the *Browse Assets* tab, below "Now you can add assets!" click `here` to add your data:

![click here to add assets](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fcdfa11114f1f13915d9bd791de85158e03ad6545.png?generation=1595273046364142\&alt=media)

*OR* you can click `Add to catalog +` in the top right and, for example, choose `Local files`:

![add local files to catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F5fc17db257fb4049d030015171c99e9af888fe9b.png?generation=1595273040916562\&alt=media)

* Browse to the `/data/merged/Telco-Customer-Churn.csv` file and double-click or click `Open`. Add an optional description and click `Add`:

![click add for local files to catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fcd28b30ad10c89573690fb4a3d608640c8f9f7f5.png?generation=1595273050852613\&alt=media)

> NOTE: Stay in the catalog until loading is complete! If you leave the catalog, the incomplete asset will be deleted.

* The newly added *Telco-Customer-Churn.csv* file will show up under the *Browse Assets* tab of your catalog:

![newly added data in catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F2542b705d31bd6ba1a192860d6c958d46edd63c8.png?generation=1595273051881669\&alt=media)

### Option 2 - Add Connection

* You can add a connection to a remote DB, for example *DB2 Warehouse in IBM Cloud*, by choosing `Add to catalog +` -> `Connection`:

![add connection to catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fd4e000b27a76351fd4d176382ff7e25ed93f510b.png?generation=1595273047846108\&alt=media)

* Choose your remote DB and click:

![chose db2 warehouse connection ](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fca6f0c2d3f2ac6520765919d90bf687f8a9f5591.png?generation=1595273014454144\&alt=media)

* Enter the connection details and click `Create`:

![enter db2 warehouse connection details](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F9c362614f220866a63f2250389f52e7187a48f17.png?generation=1595272994605517\&alt=media)

* The connection now shows up in the catalog:

![db2 warehouse connection shows up](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F3a0b7f41199c44d4400a5910898552784c10f2f8.png?generation=1595273059222570\&alt=media)

### Options 3 - Add Virtualized Data

Virtualized data can be added to the *Default* catalog by someone with Administrator or Editor access to that catalog.

* Go to the upper-left (☰) hamburger menu and choose `Organize` -> `All catalogs`. Click `Add to Catalog +` -> `Connected asset`:

![add connected asset](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F6ec1f2f30924975ed6df6c0b3e31ba0b697b3b60.png?generation=1595273015433564\&alt=media)

* Click *Source* -> `Select source`. Browse under `DV` to you Schema (i.e. UserXYZW) and choose the joined table. Click `Select`.

![seelect source](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F2c71cdaba54de1b2e7cd79b5fd5def57c0c225ef.png?generation=1595273062046336\&alt=media)

A user can now add this to a project like any other asset from a catalog.

## 2. Add collaborators and control access

* Under the *Access Control* tab you can click `Add Collaborator` to give other users access to your catalog:

![give users access to the catalog](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Febabc8aea22aec5a8f0ed167a594b2c4cce4f6ca.png?generation=1595273056577884\&alt=media)

* You can search for a user, click on the name to select them, choose a role for the user - Admin, Editor, or Viewer and click `Add`:

![search for user and add as collaborator](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F4c79a68c813e99a458442d3c09a6bdbe135e502a.png?generation=1595272977829866\&alt=media)

* To access data in the catalog, click on the name of the data:

![click data name to open](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F895babd545df4b30c689937ec004eb22c108452d.png?generation=1595273040499918\&alt=media)

* A preview of the data will open, with metadata and the first few rows:

![preview of data](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F9cd3d6d6f4358af4996745bfadea3c2bf68f0fa9.png?generation=1595273049173925\&alt=media)

* You can click the `Review` tab and rate the data, as well as comment on it, to provide feedback for your teammates:

![review data](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fe803d8d6dd38999c67267dbf81e59670e2633a85.png?generation=1595272974529348\&alt=media)

## 3. Add categories

The fundamental abstraction in Watson Knowledge Catalog is the Category. A category is analogous to a folder.

* Add a category for your assets by going to the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Categories`,&#x20;

  ![Add category](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F0438fd3a27dbf73313f5c64897b06e2133b97e04.png?generation=1595273063403574\&alt=media)

You can import them in .csv format(option 1) , or you can add categories manually(option 2).

### Option 1 - Import categories

* Click `Import`:

![Import categories](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F81ffe5c347ea91a510cfe81344203f451ba8c90c.png?generation=1595273036326713\&alt=media)

* Click `Add file` and navigate to where you cloned the workshop repository, choosing `data/wkc/glossary-organize-categories.csv`.

![Import csv](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F2c745677d022d2469113706f1ff8221715e59515.png?generation=1595273063132551\&alt=media)

* Under `Select merge option` choose `Replace all values` and click `Import`:

![Import select merge option](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fdadae45261019adf94dd7f1f3c3c469e26f92201.png?generation=1595272983548216\&alt=media)

* You will see "The import completed succesfully" when it is completed.

![Import complete](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fa8e0b460c99516fb834740c4a80584e4dc85d0d4.png?generation=1595273063127748\&alt=media)

In this way, you can import Categories, Business Terms, Classifications, Policies, etc. to populate your governance catalogs.

### Option 2 - Add category manually

* then click `Create category`:

![organize data categories](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fd3624320957c87f41752b51e985bfcaf029821a7.png?generation=1595272992588108\&alt=media)

* Give your category a name, such as *Billing*, and an optional description, and then click `Save`:

![new category billing](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F97689bd2af7ca06f4f2983f6e3e915c7cbcbcad0.png?generation=1595273060903099\&alt=media)

* Now, if you hit `Create category` again on the *Billing* category screen, you can create a sub-category, such as *Total Charges*:

![sub category total charges](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Feea120b149950cd48c76b9ce961c06c17ee808c5.png?generation=1595273038507435\&alt=media)

* For the *Billing* category you can select a *Type*, such as `Business term`:

![select business term type](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fded10fad009e93002f13040401d44fca72a6028d.png?generation=1595273058913121\&alt=media)

* We can also create classifications for assets, similar to *Confidential*, *Personally Identifiable Information*, or *Sensitive Personal Information* in a similar way, by going to the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Classifications`.&#x20;

![select classification type](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F9ea2576f1f997e149478c9bdd3bd0ddd569ef7d5.png?generation=1595273022521931\&alt=media)

* Click `New classification` dropdown and select `Create new classification`. These classifications can then be added to your category as a *Type*:&#x20;

![select classification type](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fed1eba650ed5a7d73ad514384f7cfa89a703a29e.png?generation=1595273063444679\&alt=media)

## 4. Add data classes

When you profile your assets, a data class will be inferred from the contents where possible. We'll see more on this later. You can also add your own data classes.

* Add a data class for your assets by going to the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Data classes`, then click `New data class` -> `Create new data class`:

![organize data classes](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F82397d69dedd324a22c549b456a215d5c1e32b70.png?generation=1595273058549420\&alt=media)

* Give your new data class a name, i.e. *alphanumeric*, and an optional Primary category and/or description, and click `Save as draft`:

![new data class](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F8a321b5cd0f6a5451e499d333fd2ed1936348992.png?generation=1595272991606385\&alt=media)

* Once the data class is created, we can add *Stewards* for this class, and also associate *classifications* and *business terms*. When you are ready, click `Publish`:

![tools for data class](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F6539c688347df0ddf69d185808a91ae1c0be60b0.png?generation=1595273061134285\&alt=media)

![publish comment data class](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F34e10e913b7fa73a08a05797db3bb92d23a5e355.png?generation=1595273062120924\&alt=media)

Now let's add that data class to a column in our *Telco-Customer-Churn.csv* asset.

* Go back to your Telco catalog and open it up to the column view ((☰) hamburger menu `Organize` -> `All catalogs` and choose `Telco catalog`). Under the *Browse assets* tab, click on the data set *Telco-Customer-Churn.csv* to get the column/row preview. Scroll right to get to the *CustomerID* column and click the down arrow next to "Customer Number" and then *View all*:

![change data class](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F021bffb9c84b3c3646880dd4b175608ee5e210af.png?generation=1595273057372539\&alt=media)

* In the window that opens, search for your newly created data class, *alphanumeric* and click it when it returns in the search. Then click *Select*:

![Set column to numerical data class](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F0beaf74bc437d777f80e5b7bacf075ff4c139453.png?generation=1595273062917102\&alt=media)

## 5. Add Business terms

You can use [Business terms](https://dataplatform.cloud.ibm.com/docs/content/wsj/governance/dmg16.html) to standardize definitions of business concepts so that your data is described in a uniform and easily understood way across your enterprise.

You already saw how to create a category and make it a *business term*. You can also create the business term as it's own entity.

* From the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Business terms`:

![organize Data Business terms](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Ff3fc8d2da484178a4410454292a375e1770cae49.png?generation=1595273041604681\&alt=media)

* Click on the upper-right `New business term` drop down and choose `Create new business term` button:

![create business term](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F26c5db66334f648f5f6f21de5cd2b8d066a7a534.png?generation=1595272984564375\&alt=media)

* Give the new Business term a name such as *Billing* and optional description, and click `Save as draft`. NOTE that others on the platform will be creating a business term for this workshop, so perhaps pre-pend your term with something unique, i.e *scottda-Billing*:

![name new business term](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F6293a71f9c3233b8331484845cee93e9ce4ad2a4.png?generation=1595273044233336\&alt=media)

* A window will come up once the term is created. You can see a rich set of options for creating related terms and adding other metadata. For now, click `Publish` to make this term available to users of the platform:

![publish business term](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F24f6ea98f9d82933d6cbd1de9aa199816002257e.png?generation=1595273042298631\&alt=media)

* Add an optional comment and click `Publish` in the new window:

![verify publish business term](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F14cfb1d9e23fe0e48613e6d91215ed01a9afd9cd.png?generation=1595273060311754\&alt=media)

* Now go back to your Telco catalog and open it up to the column view ((☰) hamburger menu `Organize` -> `All catalogs` and choose `Telco catalog`). Under the *Browse assets* tab, click on the data set *Telco-Customer-Churn.csv* to get the column/row preview. Scroll right to get to the *TotalCharges* column and click the *Column information* icon (looks like an "eye"):

![choose TotalCharges column information](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Ff8350a05ca506534173aeb49c28eef4325698026.png?generation=1595273044773625\&alt=media)

* In the window that opens, click the *edit* icon (looks like a "pencil") next to *Business terms* :

![edit business terms](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fcb9be69ad282b015960481728eceb64c809dce62.png?generation=1595273013891214\&alt=media)

* Enter *Billing* (or your uniquely named term such as *scottda-Billing*) under *Business terms* and the term will be searched for. Click on the `Billing` term that is found, and click `Apply`:

![edit business terms](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F1bbfa94af4af0e074a0128a74c6f12a41d0728e8.png?generation=1595273041838847\&alt=media)

Close that window once the term has been applied. Now, do the same thing to add the *Billing* Business term to the *MonthlyCharges* column.

* You will now be able to search for these terms from within the platform. For example, going back to your top level *Telco Catalog*, in the search bar with the comment "What assets are you searching for?" enter your unique *Billing* term:

![search using business terms](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fe1a14c599dd2239055821080d67d33593d9cbe62.png?generation=1595273054923641\&alt=media)

The *Telco-Customer-Churn.csv* data set will show up, since it contains columns tagged with the *Billing* business term.

## 6. Add rules for policies

We can now create rules to control how a user can access data.

* Create a business term called *CustomerID* and assign it to your *CustomerID* column in the data set using the instructions above. See below if you need details, but try it yourself first, and skip to *Adding a rule* below if you do not need a reminder.

### How to create a Business term review

* From the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Business terms`.
* Click on the upper-right `+ Create Business term` button.
* Give the new Business term the name *CustomerID* and optional description, and click `Save as draft`. In the next window, click `Publish`.
* Now go back to your Telco catalog and open it up to the column view ((☰) hamburger menu `Organize` -> `All catalogs` and choose `Telco catalog`). Under the *Browse assets* tab, click on the data set *Telco-Customer-Churn.csv* to get the column/row preview. Scroll right to get to the *CustomerID* column and click the *Column information* icon (looks like an "eye"):
* In the window that opens, click the *edit* icon (looks like a "pencil") next to *Business terms* :
* Enter *CustomerID* under *Business terms* and the term will be searched for. Click on the `CustumerID` term that is found, and click `Apply`.

### Adding a rule

* From the upper-left (☰) hamburger menu, choose `Organize` -> `Data and AI Governance` -> `Rules`,&#x20;

![select rule](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F170fb80ed7230fa72e852d60feee1e92d16f82cd.png?generation=1595273063924636\&alt=media)

* then click `New rule` -> `Create new rule`.

![create rule](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F2939e32f742393b7b6dc4a02e23ae9ec7a4f14fa.png?generation=1595273064052992\&alt=media)

* For the *New rule* -> *Select the type of rule to create* choose `Data protection rule`.

![data protection](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F23c05202792125882150fe2dc8328425f329c7a9.png?generation=1595273063745626\&alt=media)

* Under *Details* give your rule a *Name*, *Type* = *Access*, and a *Business definition*.
* Next, under *Rule builder* *Condition1* fill out If *Business term* *Contains any* *CustomerID* and Action then *mask data* *in columns containing* *alphanumeric*. Choose the tile for `Substitute`, which will make a non-identifiable hash. This obscures the actual CustomerID, but allows actions like database joins to still work. Click `Create`:

![define rule for masking customerID](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fb3feb270dbda01d8dcaa34a60230c3b4861b2206.png?generation=1595273056251766\&alt=media)

* Now if we go back to our *Telco-Customer-Churn.csv* asset in the catalog at the *CustomerID* column, it will look the same as before. But a non-admin user will see the "lock" icon and see that the customerID has now been substituted with a hash value:

![customerID is now masked](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Fb9724fdf7e001046eb656e02c818436c505549de.png?generation=1595273057535330\&alt=media)

* To add a rule to *Obfuscate* data, go to the `Profile` tab and scroll to the *TotalCharges* column. You can see that the data has been inferred to be classified as a *Quantity*:

![TotalCharges classified as Quantity](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F1b271c005e6b94221f6b6acb9d23373b0e9dae22.png?generation=1595273055984812\&alt=media)

Here is where you could change the classification if the inferred one was not what you wanted.

* You can build a rule to *Obfuscate* this *TotalCharges* column:

![TotalCharges obfuscate rule ](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2Ffba95456340b73e5a8e4d33767f4ee22d3677dff.png?generation=1595273041425304\&alt=media)

* And now that column will have data that is replaced with similarly formatted data:

![TotalCharges column obfuscated](https://2515897395-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0YTFb_WdaBDnhlXs-q%2Fsync%2F4727b79930d7d05c908600ef2f3266e7cc230a86.png?generation=1595273056919557\&alt=media)

This ends the Watson Knowledge Catalog for Admins lab.
