new_connection¶
In [ ]:
new_connection(conn_info: dict,
name: str = "vertica_connection",
auto: bool = True,
overwrite: bool = True)
Saves the new connection in the VerticaPy connection file. The function 'get_connection_file' returns the connection file path.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
conn_info | dict | ❌ | Dictionnary containing the information to set up the connection.
|
name | str | ✓ | Name of the connection. |
auto | bool | ✓ | If set to True, the connection will become the new auto-connection. |
overwrite | bool | ✓ | If set to True and the connection already exists, it will be overwritten. |
Example¶
In [22]:
from verticapy.connect import new_connection
conn_info = {"host": "10.211.55.14",
"port": "5433",
"database": "testdb",
"password": "XxX",
"user": "dbadmin"}
new_connection(conn_info, name = "VerticaDSN")