Create a data set with the Query Builder

With the Query Builder, you select all the data that you may need to visualize data. From the discover data use case, we know that we have to find the following relations:

  • Database to column
  • Column to data domain
  • Column to (privacy) standard

To organize the data, we also want to find the relation between columns and data concepts and data domains.

Besides relations, we will also show how you can add attributes to the data set. Adding responsibilities follows the same steps.

Add database-column relations

We recommend that you use Collibra for Desktop to find the necessary relations.

Actions in Collibra for Desktop

Follow-up actions in Asset Grid

  1. Look up and open a database asset.
  2. On the Overview tab, you should see the relation has Schema.

This is the first relation that you have to add in the Query Builder.

  1. On the Query Builder page, click next to Relations.
    The Add Relation to Database window appears.
  2. In the search field, type has. This is the relation type between database and schema.
  3. Click Schema so that it is highlighted.
    Select a target asset type of a relation
  4. Click Save.

You have added the first relation Database has Schema. This means that your data set contains schemas.

Database has schema relation added to data set

  1. Click a schema on the database asset page.
  2. On the Overview tab, you should see the relation contains Table.

This is the next relation to find the relationship between database and column assets.

  1. In the Database has Schema section, click next to Relations.
  2. In the search field type contains. This is the relation type between schema and table.
  3. Click Table so that it is highlighted.
  4. Click Save.

You have added the relation Schema contains Tables. This means that your data set contains tables.

Schema contains table relation added to data set

  1. Click any table in the contains Table section.
  2. On the Overview tab, you should see the section contains Columns.

This is the next relation to add in the Query Builder.

You then have traversed from database to column.

  1. In the Schema contains Tables section, click next to Relations.
  2. In the search field type contains. This is the relation type between table and column.
  3. Click Column so that it is highlighted.
  4. Click Save.

You have added the relation Table contains Column. This means that your data set contains tables.

Table contains columns relation added to data set

Add column-data domain relations

Finding the relation between Column assets and Data Concept assets and Data Domain assets is less straightforward.

Again, it is best to use Collibra for Desktop to find the relation.

We can now go in both directions, either find the relations from a data domain to a column or the other way around. It might be easier to start from a data domain and traverse over relations until you have a link with a column. If you start from a column, it is possible that you have to open many columns before you can find the relations path towards the data domain.

  1. Look up a data domain in Collibra for Desktop.
  2. A data domain groups data concepts.
  3. A data concepts classifies data attributes.
  4. Data attributes represents columns.

We have now found the relations between data domain and a column but for our use case, we have to revert the relations, leading to this result:

  1. Column is represented by a data attribute.
  2. A data attribute is classified by a data concept.
  3. A data concept is grouped by a data domain.

These are the three relations that you have to add in the Query Builder, starting from the last relation (Table contains Columns) that you added.

Tip Instead of typing the relation type in the search field, you can also enter the asset type, for example data attribute.

Relation between column and data domain

Add column-standard relations

In this section, we will add the relation between columns and privacy standards as we want to know which standard applies to the column. In this case, we can already start from the Column represented by Data Attribute relation.

On a data attribute asset, we see that there is a relation is part of Data Category, where some categories indicate a privacy law, for example CCPA or GDPR.

When you have added this new relation, you can easily add the new relation complies to Standard.

Privacy standard relations added

Add attributes to the data set

If you want to show extra information on the details page of an asset in your grid, you can add it per asset type that you have added.

  1. Click next to Attributes of the asset type, for example in the Schema contains Table section for table attributes as shown below.

    Add table attribute in query builder

  2. In the Add Attribute window, click the relevant attributes, so that they are highlighted.
  3. Click Save.
    The selected attributes are shown under Attributes.

For this use case, add attributes of the Database and Column asset types, as shown in the following images.

Attributes selection for a database asset type

Discover data use case selected attributes for the column assets

Add responsibilities to the data set

This section is just for information as we're not adding responsibilities for this use case.

If you want to show responsibility information in the asset preview in your grid, you can add it per asset type that you have added.

  1. Click next to Responsibilities of the asset type, for example in the Table contains Column section.
  2. In the Add Responsibility window, click the relevant roles, so that they are highlighted.
  3. Click Save.
    The selected roles are shown under Responsibilities.

If there are already a lot of relations expanded, ensure that you select the Responsibilities of the correct section. To easily find the correct section, collapse the relations in the section to which you want to add a responsibility by clicking on the left of Relations.

Collapse relations to find correct Responsibilities section

Relations collapsed for columns