IBM Cloud Docs
Verifying table sync in watsonx.data

Verifying table sync in watsonx.data

This topic provides details to verify that all expected tables have been successfully synced after the initial automatic as well as the manual sync operations in IBM® watsonx.data.

Before you begin

  1. Install and activate Query Optimizer in watsonx.data. See Activating Query Optimizer Manager.
  2. Names of catalogs and schemas for the tables being synced must be known.
  3. The expected number of tables within each schema must be known.

Procedure

  1. Log in to watsonx.data console.

  2. Go to Query workspace.

  3. Run the following command to retrieve a list of potential schema names:

    ExecuteWxdQueryOptimizer 'select distinct tabschema from syscat.tables where UPPER(tabschema) like '%SAMPLE_DATA%' ';
    
  4. Select the correct schema name (case-sensitive) from the results.

  5. Run one of the following commands as needed:

    a. Run this command to count the number of tables within the specified schema:

    ExecuteWxdQueryOptimizer select count(1) from syscat.tables where tabschema = 'catalog.schema';
    

    For example:

    ExecuteWxdQueryOptimizer select count(1) from syscat.tables where tabschema = 'sample_data.TPCDS_10GB';
    

    Compare the result of this query with the expected number of tables. If the counts match, it indicates that all expected tables have been synced.

    b. Run this command to list all tables within the specified schema:

    ExecuteWxdQueryOptimizer 'select TABLEORG,TABSCHEMA,TABNAME from SYSCAT.TABLES where TABSCHEMA LIKE 'iceberg_data%'';
    
  6. Run the following query to check table statistics (such as cardinality):

    ExecuteWxdQueryOptimizer 'select tabname, card from syscat.tables where tabschema = 'catalog.schema' ';
    

    For example:

    ExecuteWxdQueryOptimizer 'select tabname, card from syscat.tables where tabschema = 'sample_data.TPCDS_10GB';
    

    The syscat views provide information about database objects. You can explore other system catalog views (example, syscat.columns, syscat.indexes) to verify other aspects of the synced tables as needed.