Geospatial Support (Teradata Database) - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 1Introduction and Profiling

Product
Teradata Warehouse Miner
Release Number
5.4.6
Published
November 2018
Language
English (United States)
Last Update
2018-12-07
dita:mapPath
rfc1538171534881.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2300
Product Category
Software

Geospatial functions, as available in Teradata 13.10, are supported in Teradata Warehouse Miner primarily through the support of User Defined Types and User Defined Methods in the Variable Creation analysis (not available in the Teradata Profiler product). This is possible because the ST_GEOMETRY and MBR (Minimum Bounding Rectangle) geospatial data types are implemented internally in Teradata as User Defined Types. For more information on the support of User Defined Types, see User Defined Type Support (Teradata Database).

In order to include a call to a Geospatial function in the SQL to create an analytic data set (as created using the Variable Creation analysis), a User Defined Method SQL element can be used, found in the Other category. For convenience, the elements ST_GEOMETRY and MBR in the Geospatial category may be used as an alternative. When selected, these elements result in a User Defined Method with the appropriate User Defined Type (ST_GEOMETRY or MBR) being used.

One feature that is provided to make calling Geospatial functions easier is in the properties display of the User Defined Method SQL element in the Variable Creation analysis. This feature adds comments for certain functions to the parameter description display, based on any limitations on the sub-types (e.g. points, lines, and so forth) that may be processed by the method. Any limitations on the sub-type returned is also indicated in parentheses next to the result type of the method.

Another feature in Variable Creation that is useful in performing geospatial analysis is the ability to create literal values that represent geospatial objects. Using the standard String and String Parameter SQL elements, geospatial objects can be represented in what is called Well Known Text (WKT) format, such as ‘POINT(0 0)’. Such literal values are sometimes used as arguments to the geospatial methods. In addition, the SQL element ‘CAST’ can be used to convert geospatial objects to WKT format strings. This is particularly important considering that geospatial data cannot be viewed directly in Teradata Warehouse Miner unless it is first cast to a VARCHAR type.

A few Geospatial functions are available only as System functions or as User Defined Functions (UDFs). For example, AggGeomIntersection and AggGeomUnion are available as System functions rather than ST_Geometry methods because they are aggregate functions. Note that there is also a mechanism provided in the Variable Creation analysis to support geospatial functions that are implemented as Table functions, including GeoSequenceFromRows, GeoSequenceToRows, Tessellate and Tessellate_Search.

Also of interest to note is the fact that columns of ST_GEOMETRY or MBR type (or any User Defined Type) cannot generally be analyzed directly in Teradata Warehouse Miner profile analyses or algorithms (with the notable exception of the Values analysis). In order to perform this type of analysis on geospatial data in Teradata Warehouse Miner, the data must first be converted to some other type, possibly through the use of a database view.