verticapy.connection.delete_connection#
- verticapy.connection.delete_connection(name: str) bool #
Deletes a specified connection from the connection file.
Parameters#
- name: str
Name of the connection.
Returns#
- bool
True
if the connection was deleted,False
otherwise.
Examples#
Create a connection named ‘My_New_Vertica_Connection’:
from verticapy.connection import new_connection new_connection( { "host": "10.20.110.10", "port": "5433", "database": "vertica_eon", "password": "vertica", "user": "dbadmin", }, name = "My_New_Vertica_Connection", )
Display all available connections:
from verticapy.connection import available_connections available_connections()
['VerticaDSN', 'My_New_Vertica_Connection']
Delete the ‘My_New_Vertica_Connection’ connection:
from verticapy.connection import delete_connection delete_connection("My_New_Vertica_Connection")
Confirm that the connection no longer appears in the available connections:
available_connections()
['VerticaDSN']
See also
new_connection()
: Creates a new VerticaPy connection.