The print.sqlmr.query is a boolean option that controls whether or not to print the query being run on the Teradata Vantage Platform when an analytic function is called.
The default value is FALSE.
The following 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("kmeans_example", "computers_train1")
- Create tbl_teradata of the example data.
> computers_train1 <- tbl(con, "computers_train1")
- Call the td_kmeans_mle() analytic function. The system prints out the SQL-MR query being run on Vantage.
> td_kmeans_out2 <- td_kmeans_mle(data = computers_train1, centers = 8, iter.max = 10, unpack.columns = TRUE, threshold = 0.05 ) SQL-MR Query : SELECT * FROM KMeans ( ON "ALICE"."computers_train1" as InputTable OUT TABLE OutputTable("ALICE".r__t__td_kmeans0_159746174880110) OUT TABLE ClusteredOutput("ALICE".r__t__td_kmeans1_159746174892077) USING NumClusters('8') StopThreshold('0.05') MaxIterNum('10') UnpackColumns('TRUE') ) as sqlmr