Diagnosing and fixing problems
After opening a catalog, you will then be shown the Catalog Doctor. All the resources in the open catalog will be listed in the left panel of the Catalog Doctor window. Select a resource from the resource tree. In the right panel, you will see the information of the selected resource.
You should diagnose the resources in the following order: connection > tables and fields > formulas and summaries > queries.
Connection
The Catalog Doctor can be used to diagnose connections in the following aspects:
- Finding information of the current connection
Select a connection from the resource tree. The connection information will be displayed in the left panel.
- Modifying the current connection
Right-click the connection in the resource tree, and then click Modify on the shortcut menu. The Get JDBC Connection Information dialog will appear. You can now modify the connection.
For a JDBC-ODBC bridge, you should give the ODBC data source name, and the user ID and password (if necessary).
For a JDBC driver, uncheck Use ODBC Data Source, and check JDBC Driver. Fill in the class name of the driver, the URL, user ID and password (if necessary).
You can also change the properties values in the Properties panel directly. Select a property value, and then choose or type in the value.
Tables and fields
The Catalog Doctor can be used to diagnose tables and fields in the following aspects:
- Finding all the mapping tables, views and DBFields in the catalog
In the resource tree, expand the Relational node, then go to the Tables or Views node and reveal it. All the mapping tables, views and DBFields in the catalog will then be listed. The icon in front of each object has a specific meaning, which indicates whether the object is valid or not.
The following are descriptions of the icons in front of each object:
: Table
: Table which does not exist in the database
: Table which has invalid fields
: View
: View which does not exist in the database
: View which has invalid fields
: Field
: Field which does not exist
: Field with a name which can be found in the database, but has a type mismatch.
- Finding the stored information of a mapping table/view or a DBField
Select a table/view or a DBField in the resource tree to find its stored properties. The information will be listed in the Properties panel.
- Finding all the raw tables/views
Select a table/view in the Tables and Fields node. All the raw tables/views will be shown in the Choose from following to Re-Map panel. Each item there shows the name of a table/view.
- Getting the raw columns in a raw table/view
First select a mapping table/view, then choose a raw table/view from the Choose from following to Re-Map panel. The raw columns will be shown in the bottom right panel.
Note: If you select a mapping table/view with an existing raw table/view, the raw table/view will automatically be selected.
- Deleting a set of mapping tables, views or DBFields
To delete the mapping object, you can use one of the following methods:
- Select an object from the resources tree, right-click and on the shortcut menu click Delete.
- Click the Delete button on the toolbar after selecting the object.
- Select the object and press Delete on your keyboard.
To delete a set of mapping tables, views or DBFields, select the objects you want to delete, and click on the toolbar (or press Delete on your keyboard).
- Re-mapping (Updating) a mapping table/view
First select the mapping table/view that is to be updated from the resource tree. Then, select the raw table/view which the mapping table/view refers to from the Choose from following to Re-Map panel, and click the Update button on the toolbar.
Note: The tree is sorted by the validation status of each object (invalid objects are listed ahead). So, after you have updated a mapping table/view, the order of the objects will probably change. If the table was invalid and becomes valid after updating, it will be listed after the invalid objects.
- Re-mapping (Updating) a DBField
Before updating a DBField, you must make sure that the mapping table/view of the DBField is valid. That is, the raw table/view that the mapping table/view refers to exists in the database.
Select the DBField you want to update from the resource tree, choose the raw column you want the DBField to refer to in the bottom right panel, and then click the Update button on the toolbar.
- Adding tables/views
Click the Add Table button or the Add View button on the toolbar, or on the resource tree select a table, right-click and select Add Tables from the shortcut menu. In the Add Table/View dialog, select the tables/views you would like to add, and click Add. To finish adding, click Done.
- Adding a DBField
Select a table or a column from the resource tree, right-click and on the shortcut menu click Insert Column to bring out the Add Column dialog. Then select the column you want and click Add. When you have finished adding columns, click Done to close the dialog.
Formulas and summaries
The Catalog Doctor can be used to diagnose formulas and summaries in the following aspects:
- Finding all the formulas and summaries in the catalog
Expand the Formulas and Summaries node on the resources tree. The formulas and summaries in the catalog will be listed in the tree. They will be sorted by their validity and names. If the icon of a formula/summary is marked by a cross, it means it is invalid (it fails on compiling).
- Finding the compile Error message of a formula/summary
Select the formula/summary that is to be checked. The compile error messages will then be displayed in the Error panel.
- Replacing a mapping field with another in formulas and summaries
A frequent error is caused when the mapping fields are not found in a catalog. In which case, you will need to replace the mapped field in formulas/summaries with a valid one.
- Select the formula/summary that contains unknown fields on the resource tree.
- Click the Replace All button in the Error panel. The Replace dialog appears.
- Input the field name that is to be replaced in the Mapping Name text box.
- Click the Browse button, the Mapping Fields Browse dialog appears.
- In the Tree View tab, you can select an existing field to replace the unknown field.
- In the List View tab, you will see the mapping fields in alphabetical order and the type for each mapping field. If the mapping field is a DBField, you will see the tables/views it belongs to. Select the field you want to use as a replacement and click OK.
- Click the Replace button in the Replace dialog.
- Editing a formula/summaries
Select the formula/summary to be edited, and click the Edit button in the Error panel.
- Removing formulas/summaries
Select the formulas/summaries that are to be removed, then, do one of the following:
- Right-click and on the shortcut menu, click Delete.
- Click the Delete button on the toolbar.
- Press the Delete key on your keyboard.
Queries
The Catalog Doctor can be used to diagnose queries in the following aspects:
- Finding all the queries in the catalog
Expand the Queries node in the Relational node. All the queries will be listed in the resources tree.
- Finding the tables/views selected in a query
Select a query and expand it. All the tables/views will be listed.
- Finding the DBFields selected from a table/view in a query
Select a query and expand it, then click on a table/view and expand it. All the DBFields in the table or view will be listed.
- Finding the formulas or computed columns selected in a query
Formulas and computed columns are listed before mapping tables/views.
- Editing a query
Select the query that is to be edited, and click the Edit button in the Error panel (or right-click the query, and select Edit Query from the shortcut menu).
- Deleting queries, DBFields, formulas, computed columns and a table/view selected in a query
To delete the object, you can use one of the following methods:
- Select an object from the resources tree, right-click and on the shortcut menu click Delete.
- Click the Delete button on the toolbar after selecting the object.
- Select the object and press Delete on your keyboard.
- Saving a query as a cached query result
Select the query that is to be saved as a cached query result, and click Run (or right-click a query, and on the shortcut menu, click Create Cached Query Result).