Script() | Teradata R Package - Script() - Teradata Package for R

Teradata® Package for R User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for R
Release Number
17.20
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
efv1707506846369.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
nqx1518630623256
Product Category
Teradata Vantage

The Script() function constructs a ScriptTableOperator object that can be used to run a user-installed script or any Linux command inside database on Vantage or in the sandbox environment.

The following example creates a ScriptTableOperator object that allows users to execute user script in Vantage.
> script_obj <- Script(data = barrier %>% select(Name),
                       script.command = script_command,
                       returns = list("word"= "VARCHAR(15)", "count_input"= "VARCHAR(2)"),
                       data.order.column = "Name"
  )
> script_obj
$script.command
[1] "Rscript ./TDAPUSERDB/mapper.R"
$returns
$returns$word
[1] "VARCHAR(15)"
$returns$count_input
[1] "VARCHAR(2)"
$data
# Source:   lazy query [?? x 1]
# Database: [Teradata 16.20.27.01] [Teradata Native Driver 17.0.0.4]
#   [TDAPUSER@<hostname>1025/TDAPUSERDB]
  Name                   
  <chr>                  
1 Old Macdonald Had A Farm
$data.hash.column
NULL
$data.partition.column
NULL
$data.order.column
[1] "Name"
$is.local.order
[1] FALSE
$sort.ascending
[1] TRUE
$nulls.first
[1] TRUE
$delimiter
[1] "\t"
$auth
NULL
$charset
[1] "LATIN"
$quotechar
NULL
attr(,"class")
[1] "ScriptTableOperator"