How to import Teradata spatial data via Information Links in Spotfire

How to import Teradata spatial data via Information Links in Spotfire

book

Article ID: KB0070491

calendar_today

Updated On:

Products Versions
Spotfire Analyst All

Description

General instructions for how to create Information Links for spatial (map chart) data can be found in Community article "Using SQL Server spatial data with Spotfire" (https://community.spotfire.com/articles/spotfire/using-sql-server-spatial-data-spotfire). However, accessing spatial data from Teradata in this way may result in the following error:

Error message: Failed to create DataTable

ImportException at Spotfire.Dxp.Data:
Failed to create DataTable (HRESULT: 80131500)

(...)

InformationModelException at Spotfire.Dxp.Data:
Failed to execute query: [Teradata Database] [TeraJDBC 16.20.00.12] [Error 6834] [SQLState HY000] Method '<ST_GEOMETRY>.STAsBinary( ... )' does not exist. (HRESULT: 80131500)

Issue/Introduction

This article describes how to use Information Links in Spotfire to access Teradata spatial data. Note that you may encounter issues if the the column containing the spatial data is a BLOB - if so, cast it to a VARBYTE.

Environment

All

Resolution

If you encounter the issue mentioned above ("Method '<ST_GEOMETRY>.STAsBinary( ... )' does not exist"), this may be caused by the JDBC driver transferring binary data differently if it's a BLOB as opposed to a VARBYTE.

To resolve that issue, change the column expression from

%1.ST_AsBinary()

to

cast(%1.ST_AsBinary() as varbyte(1000))

where the varbyte length needs to be large enough to fit the data.

Additional Information