print.sqlmr.query | Teradata Package for R - print.sqlmr.query - Teradata Package for R

Teradata® Package for R User Guide

Product
Teradata Package for R
Release Number
17.00
Published
July 2021
Language
English (United States)
Last Update
2023-08-08
dita:mapPath
yih1585763700215.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
B700-4005
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