IBM Db2 on Cloud lineage configuration
To import lineage metadata from IBM Db2 on Cloud, create a connection, data source definition and metadata import job.
This information applies to IBM Manta Data Lineage service.
Db2 on Cloud is an SQL database that is managed by IBM Cloud and is provisioned for you in the cloud.
Supported Db2 on Cloud versions
- Db2 on Cloud version 11.1 or later (remote)
Processed metadata
The following Db2 on Cloud metadata is processed and displayed in lineage:
- Data dictionaries
- Scripts
- Stored procedures
- SQL
- Modules
- Functions
- Triggers
- Views
- Packages
- Aliases and synonyms
- The ompatibility mode for Oracle
Limitations
The following data is not processed:
- Netezza Performance Server (NPS) compatibility features
- Assets that use dynamically executed code through the
EXECUTE IMMEDIATEstatement. - If aliases and synonyms aren't referenced in the SQL queries, procedures, or functions, they don't appear in the flow viewer nor the object list.
- Lineage through XML functions, including:
xmlelementxmlaggxmltable
Prerequisite configuration
Before you import lineage metadata, ensure that the following prerequisites are met:
- You have the following rights:
- CONNECT ON DATABASE
- USAGE ON WORKLOAD
SYSDEFAULTUSERWORKLOAD - EXECUTE ON PROCEDURE
SYSPROC.DB2LK_GENERATE_DDL - EXECUTE ON PROCEDURE
SYSPROC.DB2LK_CLEAN_TABLE - USAGE ON SEQUENCE
SYSTOOLS.DB2LOOK_TOKEN - INSERT, UPDATE, DELETE, SELECT ON TABLE
SYSTOOLS.DB2LOOK_INFO - SELECT ON
SYSTOOLS.DB2LOOK_INFO_V - SELECT on the following system tables and views Unless the database was created in Restrict mode, these are granted to every user by default:
SYSCAT.ATTRIBUTESSYSCAT.AUDITPOLICIESSYSCAT.COLUMNSSYSCAT.CONDITIONSSYSCAT.CONTEXTSSYSCAT.CONTROLSSYSCAT.DATATYPEDEPSYSCAT.DATATYPESSYSCAT.FUNCTIONSSYSCAT.HIERARCHIESSYSCAT.CHECKSSYSCAT.INDEXESSYSCAT.INDEXEXTENSIONSSYSCAT.INDEXXMLPATTERNSSYSCAT.KEYCOLUSESYSCAT.MODULEOBJECTSSYSCAT.MODULESSYSCAT.NICKNAMESSYSCAT.PACKAGESSYSCAT.PERIODSSYSCAT.PROCEDURESSYSCAT.REFERENCESSYSCAT.ROLESSYSCAT.ROUTINEDEPSYSCAT.ROUTINEPARMSSYSCAT.ROUTINESSYSCAT.ROWFIELDSSYSCAT.SECURITYLABELCOMPONENTSSYSCAT.SECURITYLABELSSYSCAT.SECURITYPOLICIESSYSCAT.SEQUENCESSYSCAT.SERVEROPTIONSSYSCAT.SERVERSSYSCAT.SCHEMATASYSCAT.STATEMENTSSYSCAT.TABCONSTSYSCAT.TABLESSYSCAT.TABOPTIONSSYSCAT.TRIGGERSSYSCAT.VARIABLEDEPSYSCAT.VARIABLESSYSCAT.VIEWDEPSYSCAT.VIEWSSYSIBM.ROUTINESSYSIBM.SYSDATATYPESSYSIBM.SYSDEPENDENCIESSYSIBM.SYSDUMMY1SYSIBM.SYSFUNCMAPPINGSSYSIBM.SYSFUNCTIONSSYSIBM.SYSINDEXESSYSIBM.SYSINDEXOPTIONSSYSIBM.SYSMODULESSYSIBM.SYSROUTINEOPTIONSSYSIBM.SYSROUTINEPARMSSYSIBM.SYSROUTINESSYSIBM.SYSSERVERSSYSIBM.SYSSCHEMATASYSIBM.SYSTABLESSYSIBM.SYSTABOPTIONSSYSIBM.SYSTYPEMAPPINGSSYSIBM.SYSUSEROPTIONSSYSIBM.SYSVARIABLESSYSIBM.SYSWRAPPERSSYSIBMADM.ENV_INST_INFOSYSIBMADM.ENV_SYS_INFOSYSIBM.SYSKEYCOLUSESYSIBM.SYSTABCONST
Creating a metadata import asset
Data source connection
To connect to the data source from which you want to import lineage metadata, you need to select a data source definition and a connection. You can create them before you start creating the metadata import, or you can create them when you create and configure the metadata import asset.
Data source definition
Select IBM Db2 as the data source type.
Connection
For connection details, see IBM Db2 on Cloud connection.
Connection mode
You can connect to Db2 on Cloud by using one of the following connection modes:
- Direct connection
- Remote connection with a Manta agent. When an agent is configured, select it from the list. For more information, see Configuring agents for lineage metadata import.
Include and exclude lists
You can include or exclude assets up to the schema level. Each value is evaluated as a regular expression. Assets which are added later in the data source will also be included or excluded if they match the conditions specified in the lists. Example values:
mySchema:mySchemaschema.mySchema[1-5]: any schema with a name that starts withmySchemaand ends with a digit between 1 and 5.
External inputs
If you use external Db2 PL/SQL scripts, you can add them in a .zip file as an external input. You can organize the structure of a .zip file as subfolders that represent schemas. After the scripts are scanned, they are added under respective schemas in the selected catalog or project. The .zip file can have the following structure:
<schema_name>
<script_name.sql>
<script_name.sql>
replace.csv
The replace.csv file contains placeholder replacements for the scripts that are added in the .zip file. For more information about the format, see Placeholder replacements.
Advanced import options
- Extract extended attributes
- You can extract extended attributes like primary key, unique and referential integrity constraints of columns. By default these attributes are not extracted.