Returns the current database connection. If the connection is closed, VerticaPy attempts to reconnect with the existing connection.
If the connection attempt fails, VerticaPy attempts to reconnect using stored credentials. If this also fails, VerticaPy attempts to connect using an auto connection. Otherwise, VerticaPy attempts to connect to a VerticaLab Environment.
from verticapy.connect import current_connection conn = current_connection() conn
<vertica_python.vertica.connection.Connection at 0x118c1f8d0>
['Vertica Analytic Database v11.0.1-0']