16.20 - Overview - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

In advanced data analytics, statistical models are used to make predictions of future events based on current and historical data. R is a data analysis software and a programming language for statistical modeling and graphics.

Teradata provides in-database support for R program execution. Data stored in Teradata databases can be directly accessed by the R execution engine for analysis. R scripts are executed in parallel inside the database using the system table operator ExecR. R scripts can only be run as table operators and not as user-defined functions.

You can also write table operators that access the data in the database via R FNC functions and process the data using any of the data analysis tools available in R. R table operators include functionality such as the following:
  • Support of multiple input streams

    For example, you can store statistical models in the database and pass them to a scoring table operator as input streams.

  • Support of contract functions and R FNC functions to set and get metadata

    With this functionality, you can define polymorphic scripts. Also, a contract function can be used to precompute some intermediate result only once, and then pass this intermediate result to all AMPs using the contract context. This may result in performance improvements.

The table operator feature is a Teradata extension to the ANSI SQL:2011 standard.