Loading...

Connection#


Functions#

Important

For a comprehensive guide to create connections, please refer to Connection.

Read#

auto_connect()

Automatically creates a connection using the auto-connection.

available_connections()

Displays all available connections.

connect(section[, dsn])

Connects to the database.

current_connection()

Returns the current database connection.

current_cursor()

Returns the current database cursor.

get_connection_file()

Gets (and creates, if necessary) the auto-connection file.

get_confparser([dsn])

Parses the input DSN and returns the linked Config Parser.

read_dsn(section[, dsn])

Reads the DSN information from the VERTICAPY_CONNECTION environment variable or the input file.

vertica_connection(section[, dsn])

Reads the input DSN and creates a Vertica Database connection.

verticapylab_connection()

Returns the VerticaPyLab connection, if possible.

Write#

change_auto_connection(name)

Changes the current auto connection.

new_connection(conn_info[, name, auto, ...])

Saves the new connection in the VerticaPy connection file.

set_connection(conn)

Saves a custom connection to the VerticaPy object.

set_external_connection(cid[, rowset, symbol])

Sets a Connection Identifier Database.

Close/Delete#

close_connection()

Closes the connection to the database.

delete_connection(name)

Deletes a specified connection from the connection file.


Global Connection#

global_connection.GlobalConnection()

Main Class to store the Global Connection used by all VerticaPy objects.

Methods:

GlobalConnection.get_connection()

Returns the current connection.

GlobalConnection.get_dsn()

Returns the current dsn.

GlobalConnection.get_dsn_section()

Returns the current dsn section.

GlobalConnection.get_external_connections()

Returns the external connection.

GlobalConnection.set_connection(conn[, ...])

Returns the current dsn section.

GlobalConnection.set_external_connections(...)

Returns the current dsn section.