Publishing Db2 Data Gate table metadata

If the IBM Watson® Knowledge Catalog integration feature has been configured, Db2 Data Gate table metadata can be published to IBM Watson Knowledge Catalog by a one-click-action.

Checking the status

A tile labeled Watson Knowledge Catalog Integration on the dashboard of your Db2 Data Gate instance allows you to check the current integration status. Possible status values are:

Not configured
The Watson Knowledge Catalog service is not configured. Make sure you completed all steps in Configuring Db2 Data Gate table metadata publishing to Watson Knowledge Catalog successfully.
Available
The Watson Knowledge Catalog service was integrated successfully. The service can be reached from the Db2 Data Gate instance.
Error
The Watson Knowledge Catalog service is installed, but cannot be reached by Db2 Data Gate. If the status is Error, run the following checks:
  1. Check if the Watson Knowledge Catalog service is up and running.
  2. Check if all Db2 Data Gate pods are up and running.

Below the status, you find a timestamp or the information N/A. A timestamp indicates the last time metadata was published to Watson Knowledge Catalog. If the information N/A is displayed, it means that metadata has not been published until now.

Publishing

If the status is Available, you can click the Publish to catalog button on the dashboard to publish Db2 Data Gate table metadata to the configured Watson Knowledge Catalog.

A publishing action has the following effects:

  • Connection assets are created in the catalog for the database connections that are used by the Db2 Data Gate instance. These are connection assets for the Db2 for z/OS® source database and the Db2 or Db2 Warehouse target database. The name of the created connection assets follows this naming pattern:
    subsystem_name (source|target) - data_gate_instance_name
  • Data assets are created in the catalog for the database connections that are used by the Db2 Data Gate instance. These are connection assets for the Db2 for z/OS source database and the Db2 or Db2 Warehouse target database.
  • Catalog assets are created for all source database tables and target database tables that are managed by the Db2 Data Gate instance. The creation of these assets, however, depends on the state of the tables. Assets are created only if the tables are in the Loaded or Active state.
  • A tag with the name of the Db2 Data Gate instance is added to all connection assets and data assets that are created.
  • Relationships between the source database tables and the corresponding target database tables are created.

If you click the Publish to catalog button again, and if tables in the Db2 Data Gate instance have changed since the last publishing action, the changes will be reflected in the associated Watson Knowledge Catalog instance:

  • If new tables have been added, assets for these tables will be added to Watson Knowledge Catalog, provided that the state of the tables permits an asset creation.
  • Table state changes from a state that did not permit asset creation to a state that permits asset creation result in the creation of data assets.
  • Table state changes from a state that permitted asset creation to a state that does not permit an asset creation are ignored. That is, related data assets are not removed.
  • If tables have been removed from the Db2 Data Gate instance, the information in Watson Knowledge Catalog stays the same. Existing data assets are not removed.
  • Existing assets are recreated or overwritten according to the settings of the configured Watson Knowledge Catalog. For more information see Detection and handling of duplicates.

Detection and handling of duplicates

Watson Knowledge Catalog offers different strategies for the detection of duplicates and various options for the handling of duplicate assets. See: The strategies and options to be used are determined when you publish metadata assets. The duplicate detection strategy is determined by an evaluation of the asset name, its resource key, or the combination of both. The duplicate asset handling strategy defines the actions to be taken by Watson Knowledge Catalog in accordance with the detection strategy when a duplicate asset is found. Watson Knowledge Catalog can react in the following ways:
  • Update a previous asset with the information of a newly published duplicate
  • Allow the creation of a duplicate asset
  • Preserve the original asset and reject the duplicate

When metadata assets are published to the configured catalog, Db2 Data Gate relies on the settings and capabilities of Watson Knowledge Catalog with regard to the detection of duplicates. Whether an asset is identified as a duplicate depends on the strategy that is configured for the target metadata catalog. Bear this in mind when you use the Watson Knowledge Catalog integration feature because Db2 Data Gate will always publish the metadata information of all the tables managed by the Db2 Data Gate in accordance with the conditions outlined in the Publishing section.

Attention: Db2 Data Gate publishes metadata assets according to pre-defined naming patterns. If the target metadata catalog uses the duplicate detection by name strategy at the time of pressing the Publish to catalog button, and previously published metadata assets have been renamed, the asset will not be identified as a duplicate. As a result, the asset will be created again with the original name generated by Db2 Data Gate. If a connection asset is affected, all related data assets will also be recreated. To avoid the creation of duplicate assets by Db2 Data Gate, do not rename assets, or consider using resource keys as the duplicate detection strategy for the target metadata catalog.

The method that is chosen for the handling of detected duplicates at the catalog level, on the other hand, Data Gate overwrites while publishing the assets. Db2 Data Gate enforces the following methods based on the asset types:

  • The strategy implemented for the handling of Data asset duplicates is always preserve original assets and reject duplicates. If a data asset, that is, an asset representing a table, already exists, it will not be modified and no additional asset will be created. This behavior prevents a repetitive recreation of data assets by Db2 Data Gate and the loss of user-provided changes to the asset, except for the asset name. See the previous note.
  • The strategy implemented for the handling of connection asset duplicates is always update original asset

    That is, the existing source and target database connection assets will be updated with each metadata publication from Db2 Data Gate. Duplicates will not be created. This behavior asserts that connection information related to the source and target databases (for example, user name and password) are always up-to-date. If connection credentials are updated, the following actions need to be performed for propagating these changes to the configured Watson Knowledge Catalog.

  • If you want to update the credentials for the Db2 for z/OS connection, first update these credentials in the Db2 Data Gate source definition. See Updating a source definition for Db2 Data Gate. Then publish the metadata again to Watson Knowledge Catalog through the Db2 Data Gate UI.
  • If you want to update the credentials for the target database, first update these in the Watson Knowledge Catalog configuration wizard. See Configuring Db2 Data Gate table metadata publishing to Watson Knowledge Catalog. Then publish the metadata again to Watson Knowledge Catalog through the Db2 Data Gate UI.
Note: