verticapy.connection.connect#
- verticapy.connection.connect(section: str, dsn: str | None = None) None #
Connects to the database.
Parameters#
- section: str
Name of the section in the configuration file.
- dsn: str, optional
Path to the file containing the credentials. If empty, the Connection File will be used.
Examples#
Display all available connections:
from verticapy.connection import available_connections available_connections()
['VML', 'VerticaDSN', 'VerticaDSN_test']
Connect using the VerticaDSN connection:
from verticapy.connection import connect connect("VerticaDSN")
See also
available_connections()
: Displays all available connections.get_connection_file()
: Gets the VerticaPy connection file.new_connection()
: Creates a new VerticaPy connection.set_connection()
: Sets the VerticaPy connection.