Loading...

verticapy.performance.vertica.qprof.QueryProfiler.get_version#

static QueryProfiler.get_version() tuple[int, int, int, int]#

Returns the current Vertica version.

Returns#

tuple

List containing the version information. MAJOR, MINOR, PATCH, POST

Examples#

First, let’s import the QueryProfiler object.

from verticapy.performance.vertica import QueryProfiler

Then we can create a query:

qprof = QueryProfiler(
    "select transaction_id, statement_id, request, request_duration"
    " from query_requests where start_timestamp > now() - interval'1 hour'"
    " order by request_duration desc limit 10;"
)

We can get the Verica version by:

qprof.get_version()
Out[3]: (23, 4, 0, 0)

Note

When using this function in a Jupyter environment you should be able to see the SQL query nicely formatted as well as color coded for ease of readability.

Note

For more details, please look at QueryProfiler.