Sample use cases
Add a community, a domain with assets representing schema, tables, columns and the relevant relations
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the following assets to the created domain:
SCHEMA_1
,TABLE_1
,TABLE_2
,TAB_1_COLUMN_1
,TAB_1_COLUMN_2
,TAB_2_COLUMN_1
. - Creates the relations:
SCHEMA_1 contains TABLE_1
.SCHEMA_1 contains TABLE_2
.TAB_1_COLUMN_1 is part of TABLE_1
.TAB_1_COLUMN_2 is part of TABLE_1
.TAB_2_COLUMN_1 is part of TABLE_2
.
Input |
---|
|
Import mappings for assets
The JSON in this section creates mappings for schema, table and column assets.
Note This example works only if the referenced resources exist. Run the import commands from the beginning of this page to create them.
The following mappings are created, in an environment where these resources do not exist yet:
- (
EXT_SYSTEM
,EXT_SCHEMA_1_ID
) →SCHEMA_1
. - (
EXT_SYSTEM
,EXT_TABLE_1_ID
) →TABLE_1
. - (
EXT_SYSTEM
,EXT_TABLE_2_ID
) →TABLE_2
. - (
EXT_SYSTEM
,EXT_TABLE_1_COLUMN_1_ID
) →TAB_1_COLUMN_1
. - (
EXT_SYSTEM
,EXT_TABLE_1_COLUMN_2_ID
) →TAB_1_COLUMN_2
. - (
EXT_SYSTEM
,EXT_TABLE_2_COLUMN_1_ID
) →TAB_2_COLUMN_1
.
Note When you manually delete a resource that is referenced by a mapping, the mapping is not also deleted. Only the reference to the deleted resource in the mapping is removed. This helps external systems detect that Collibra used to store resources that are now deleted. The external systems can then decide to take appropriate action.
Input |
---|
|
Import assets and create mappings implicitly
You can import assets and their mappings within the same input file.
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the following assets to the created domain:
SCHEMA_1
,TABLE_1
,TABLE_2
,TAB_1_COLUMN_1
,TAB_1_COLUMN_2
,TAB_2_COLUMN_1
. - Creates the relations:
SCHEMA_1 contains TABLE_1
.SCHEMA_1 contains TABLE_2
.TAB_1_COLUMN_1 is part of TABLE_1
.TAB_1_COLUMN_2 is part of TABLE_1
.TAB_2_COLUMN_1 is part of TABLE_2
.
- Creates the mappings:
- (
EXT_SYSTEM
,EXT_SCHEMA_1_ID
) →SCHEMA_1
. - (
EXT_SYSTEM
,EXT_TABLE_1_ID
) →TABLE_1
. - (
EXT_SYSTEM
,EXT_TABLE_2_ID
) →TABLE_2
. - (
EXT_SYSTEM
,EXT_TABLE_1_COLUMN_1_ID
) →TAB_1_COLUMN_1
. - (
EXT_SYSTEM
,EXT_TABLE_1_COLUMN_2_ID
) →TAB_1_COLUMN_2
. - (
EXT_SYSTEM
,EXT_TABLE_2_COLUMN_1_ID
) →TAB_2_COLUMN_1
.
- (
Note When you manually delete a resource that is referenced by a mapping, the mapping is not also deleted. Only the reference to the deleted resource in the mapping is removed. This helps external systems detect that Collibra used to store resources that are now deleted. The external systems can then decide to take appropriate action.
Input |
---|
|
Modify an asset using the asset mapping as identification
You can update an asset using the asset mapping as identifier.
Note This example works only if the referenced resources exist. Run the import commands from the beginning of this page to create them.
Input |
---|
|
Update schema, table and column assets
Note This example works only if the referenced resources exist. Run the import commands from the beginning of this page to create them.
The JSON in this section performs the following operations:
- Changes the display name of
SCHEMA_1
to SCHEMA. - Changes the display name of
TABLE_1
to T1. - Changes the display name of
TABLE_2
to T2. - Changes the display name of
TAB_1_COLUMN_1
to C1. - Changes the display name of
TAB_1_COLUMN_2
to C2. - Changes the display name of
TAB_2_COLUMN_1
to C3.
Input |
---|
|
Import multiple resource attributes
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the asset
DB_TABLE
to the created domain with the following attributes:- Profiling Information.
- Description.
Input |
---|
|
Import multivalue attributes
For this example to work, you must create a new attribute type and assign it to the Table asset type in Collibra Data Intelligence Cloud.
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the asset
DB_TABLE
to the created domain with the following multivalue attribute:- Indexes.
Input |
---|
|
Import relations
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the asset
DB_SCHEMA
without relations. - Adds the asset
DB_TABLE
with a source relation toUSERS_SCHEMA
. - Adds the asset
DB_COLUMN
with a target relation toUSERS_TABLE
.
Input |
---|
|
Import tags
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a community:
DBs Community
. - Adds a domain inside the created community:
Physical Domain
. - Adds the asset
DB_SCHEMA
without tags. - Adds the asset
DB_TABLE
with the tags:TAG_1
.TAG_2
.
Input |
---|
|
Import complex relations
For this example to work, you must have the following resources:
- A community named
DBs Community
. - A Physical Data Dictionary domain inside the community named
Physical Domain
. - A Mapping domain inside the community named
My Mapping Domain
. - The following Column assets in Physical Domain:
DB_COL_SOURCE_1
,DB_COL_SOURCE_2
,DB_COL_TARGET_1
,DB_COL_TARGET_2
. - A Mapping Specification asset named
MapSpec
in My Mapping Domain.
The JSON in this section performs the following operations in an environment where these resources do not exist yet:
- Adds a field mapping complex relation between the assets and a description attribute.
- Creates a mapping based on the external system and entity for the imported complex relation for further reference.
Input |
---|
|