How to introspect GEOMETRY columns in TIBCO Data Virtualization?

How to introspect GEOMETRY columns in TIBCO Data Virtualization?

book

Article ID: KB0072401

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All Supported Versions

Description

When a user introspects a table that contains a column of type geometry(native type), the column will get introspected in TDV to the type 'OTHER'.

User-added image

Due to this, it would not be possible to retrieve the results from the resource and the user will face the following error when executing the respective table/view:

User-added image

Issue/Introduction

This article will list the steps to introspect GEOMETRY columns in TIBCO Data Virtualization.

Resolution

To resolve this error, a mapping of the data type geometry will have to be done to a more suitable type like varchar or blob. For this, the user has to update the specific data source capabilities file and provide the appropriate data type mapping. 

For ease of explanation, the data source, and the capabilities file example are provided using the adapter MySQL 5.5. If another data source adapter is used, then the capabilities file associated with it should be modified accordingly.

Steps to be followed:
1. Navigate to the following location:
<TDV_Server_Dir>\apps\dlm\cis_ds_mysql\conf
2. Open the 'mysql.capabilities' file

3. Add the following line to the capabilities file:
 jdbcds.datatype.geometry: blob
            or
 jdbcds.datatype.geometry: varchar

Note: The user has to choose the appropriate data type based on the values entered in the geometry column.

4. Save the file.
5. For this change to be applied, a restart of the TDV server is required.

Once the server is running, re-introspect the data source tables in TDV Studio. The geometry columns should reflect the new datatype that was provided in the capabilities file earlier.

User-added image

Now, the user will be able to work with geometry columns in TDV and also be able to query the results successfully.