Teradata R Package Function Reference - Teradata R Package Function Reference - Teradata R Package - Look here for syntax, methods and examples for the functions included in the Teradata R Package.

Teradata® R Package Function Reference

Product
Teradata R Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-02-28
dita:id
B700-4007
lifecycle
previous
Product Category
Teradata Vantage

Teradata Vantage is our flagship analytic platform offering, which evolved from our industry-leading Teradata Database. Until references in content are updated to reflect this change, the term Teradata Database is synonymous with Teradata Vantage.

Teradata Advanced SQL Engine (was NewSQL) is a core of Teradata Vantage, based on our best-in-class Teradata Database processing capability. Advanced SQL refers to the ability to run advanced analytic functions beyond that of standard SQL.

This document provides detailed description and complete usage information for all the functions and verbs in the Teradata® R Package, tdplyr.

tdplyr Function Categories

Categories of tdplyr package functions:

  • td_<name>_<engine>: Analytic functions.
  • td_<name>_context: API functions that manage the connection and certain internal data structures called context.
  • <name>.Teradata: R S3 functions that override the corresponding dplyr package functions with new functionality. In most cases, tdplyr-specific additional parameters are added to these functions.
  • td_<name>_predict_<engine> and predict.td_<name>_<engine>: Scoring and prediction functions that are invoked with the predict S3 generic call or with a corresponding "td_*_predict" function call.

Note: name is part of a function name that indicates the specific task of the function. engine is the location where the function is executed. Valid values are mle for Machine Learning Engine and sqle for SQL Engine.

tdplyr Analytic Function Default Execution Locations

Each analytic function in tdplyr has an equivalent function that can be invoked without engine suffix.

For the tdplyr analytic functions without engine suffix, the following table lists those that have the default execution location in the Advanced SQL Engine.

Function Name Executed in Equivalent to
td_antiselect SQL Engine td_antiselect_sqle
td_attribution SQL Engine td_attribution_sqle
td_decision_forest_predict SQL Engine td_decision_forest_predict_sqle
td_decision_tree_predict SQL Engine td_decision_tree_predict_sqle
td_glm_predict SQL Engine td_glm_predict_sqle
td_naivebayes_predict SQL Engine td_naivebayes_predict_sqle
td_naivebayes_textclassifier_predict SQL Engine td_naivebayes_textclassifier_predict_sqle
td_ngramsplitter SQL Engine td_ngramsplitter_sqle
td_npath SQL Engine td_npath_sqle
td_pack SQL Engine td_pack_sqle
td_sessionize SQL Engine td_sessionize_sqle
td_stringsimilarity SQL Engine td_string_similarity_sqle
td_svm_sparse_predict SQL Engine td_svm_sparse_predict_sqle
td_unpack SQL Engine td_unpack_sqle

All other tdplyr analytic functions without engine suffix are executed by default in the Machine Learning Engine, and are equivalent to the td_<name>_mle functions in tdplyr.

Note: Teradata recommends using tdplyr analytic functions with engine suffix.

The Moving Average analytic function does not have an equivalent function that can be invoked without an engine suffix. Invoke on the SQL Engine using td_moving_average_sqle with the argument 'mavgtype'.