print.sqlmr.query | Teradata Package for R - print.sqlmr.query - 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
ft:locale
en-US
ft:lastEdition
2024-04-09
dita:mapPath
efv1707506846369.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
nqx1518630623256
Product Category
Teradata Vantage

The print.sqlmr.query is a logical option that controls whether or not to print the query being run on Vantage when an analytic function is called.

The default value is FALSE.

Example

This example shows the system output when this option is set to TRUE.

  • Set the option to TRUE.
    > options(print.sqlmr.query = TRUE)
  • Load the example data.
    loadExampleData("antiselect_example", "antiselect_input")
  • Create tbl_teradata of the example data.
    > antiselect_input <- tbl(con, "antiselect_input")
  • Call the td_antiselect_sqle() analytic function. The system prints out the SQL-MR query being run on Vantage.
    > result <- td_antiselect_sqle(data=antiselect_input,
                                  exclude=c('rowids','orderdate','discount','province','custsegment'),
                                  data.order.column='orderdate')
    SQL-MR Query :
     SELECT * FROM Antiselect (
        ON "ALICE"."antiselect_input" as "input"
        PARTITION BY ANY
        ORDER BY "orderdate" 
        USING
        Exclude('rowids','orderdate','discount','province','custsegment')
    )  as sqlmr