print_sqlmr_query | Display Options | Teradata Python Package - print_sqlmr_query - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

The print_sql_mr_query option is a boolean that controls whether or not to print the query being sent to when an analytic function is called. The default is False.

Example: Set the value to True

>>> display.print_sqlmr_query = True
>>> from teradataml.analytics.KMeans import KMeans

>>> computers_train1 = DataFrame.from_table("computers_train1")
>>> kmeanssample_centroid = DataFrame.from_table("kmeanssample_centroid")
>>> result = KMeans(data=computers_train1,
                        centroids_table=kmeanssample_centroid,
                        centers=8,
                        threshold=0.0395,
                        iter_max=10,
                        unpack_columns=False,
                        seed=10,
                        data_sequence_column='primary_index'
                        )

 
SELECT * FROM KMeans(
    ON "computers_train1" AS InputTable
    ON "kmeanssample_centroid" AS CentroidsTable
    OUT TABLE OutputTable(TDML.ml__td_kmeans0_1538706050004791)
    OUT TABLE ClusteredOutput(TDML.ml__td_kmeans1_1538702918024205)
    USING
    NumClusters('8')
    MaxIterNum('10')
    Seed('10')
    SequenceInputBy('InputTable:primary_index')
) as sqlmr