IBM Db2 lineage configuration

To import lineage metadata from IBM Db2, create a connection, data source definition and metadata import job.

IBM Db2 is a database that contains relational data.

Supported IBM Db2 versions

  • IBM Db2 10.1, 11.5 and 12.1

Processed metadata

The following IBM Db2 metadata is processed and displayed in lineage:

  • Data dictionaries
  • Scripts
  • Stored procedures
  • SQL
  • Modules
  • Functions
  • Triggers
  • Views
  • Packages
  • Aliases / Synonyms
  • Oracle’s compatibility mode

Limitations

The following data is not processed:

  • Netezza Performance Server (NPS) compatibility features.

  • Assets that use dynamically executed code through the EXECUTE IMMEDIATE statement.

  • Lineage through XML functions, including:

    • xmlelement
    • xmlagg
    • xmltable
  • 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.

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 the Restrict mode, these are granted to every user by default:
      • SYSCAT.ATTRIBUTES
      • SYSCAT.AUDITPOLICIES
      • SYSCAT.COLUMNS
      • SYSCAT.CONDITIONS
      • SYSCAT.CONTEXTS
      • SYSCAT.CONTROLS
      • SYSCAT.DATATYPEDEP
      • SYSCAT.DATATYPES
      • SYSCAT.FUNCTIONS
      • SYSCAT.HIERARCHIES
      • SYSCAT.CHECKS
      • SYSCAT.INDEXES
      • SYSCAT.INDEXEXTENSIONS
      • SYSCAT.INDEXXMLPATTERNS
      • SYSCAT.KEYCOLUSE
      • SYSCAT.MODULEOBJECTS
      • SYSCAT.MODULES
      • SYSCAT.NICKNAMES
      • SYSCAT.PACKAGES
      • SYSCAT.PERIODS
      • SYSCAT.PROCEDURES
      • SYSCAT.REFERENCES
      • SYSCAT.ROLES
      • SYSCAT.ROUTINEDEP
      • SYSCAT.ROUTINEPARMS
      • SYSCAT.ROUTINES
      • SYSCAT.ROWFIELDS
      • SYSCAT.SECURITYLABELCOMPONENTS
      • SYSCAT.SECURITYLABELS
      • SYSCAT.SECURITYPOLICIES
      • SYSCAT.SEQUENCES
      • SYSCAT.SERVEROPTIONS
      • SYSCAT.SERVERS
      • SYSCAT.SCHEMATA
      • SYSCAT.STATEMENTS
      • SYSCAT.TABCONST
      • SYSCAT.TABLES
      • SYSCAT.TABOPTIONS
      • SYSCAT.TRIGGERS
      • SYSCAT.VARIABLEDEP
      • SYSCAT.VARIABLES
      • SYSCAT.VIEWDEP
      • SYSCAT.VIEWS
      • SYSIBM.ROUTINES
      • SYSIBM.SYSDATATYPES
      • SYSIBM.SYSDEPENDENCIES
      • SYSIBM.SYSDUMMY1
      • SYSIBM.SYSFUNCMAPPINGS
      • SYSIBM.SYSFUNCTIONS
      • SYSIBM.SYSINDEXES
      • SYSIBM.SYSINDEXOPTIONS
      • SYSIBM.SYSMODULES
      • SYSIBM.SYSROUTINEOPTIONS
      • SYSIBM.SYSROUTINEPARMS
      • SYSIBM.SYSROUTINES
      • SYSIBM.SYSSERVERS
      • SYSIBM.SYSSCHEMATA
      • SYSIBM.SYSTABLES
      • SYSIBM.SYSTABOPTIONS
      • SYSIBM.SYSTYPEMAPPINGS
      • SYSIBM.SYSUSEROPTIONS
      • SYSIBM.SYSVARIABLES
      • SYSIBM.SYSWRAPPERS
      • SYSIBMADM.ENV_INST_INFO
      • SYSIBMADM.ENV_SYS_INFO
      • SYSIBM.SYSKEYCOLUSE
      • SYSIBM.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 connection.

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: mySchema schema.
  • mySchema[1-5]: any schema with a name that starts with mySchema and 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.

Learn more