verticapy.connection.set_external_connection#
- verticapy.connection.set_external_connection(cid: str, rowset: int = 500, symbol: str = '$') None #
Sets a Connection Identifier Database. It connects to an external source using DBLINK. For more information, see: DBLINK
Parameters#
- cid: str
Connection Identifier Database.
- rowset: int, optional
Number of rows retrieved from the remote database during each SQLFetch() cycle.
- symbol: str, optional
A special character to identify the connection. One of the following:
"$", "€", "£", "%", "@", "&", "§", "?", "!"
For example, if the symbol is ‘$’, you can call external tables with the input cid by writing $$$QUERY$$$, where QUERY represents a custom query.
Examples#
Set up a connection with a database using the alias “pgdb”.
Note
When configuring an external connection, you’ll need to assign a unique symbol to identify it. This symbol will subsequently allow you to extract data from the target database using the associated identifier.
import verticapy as vp vp.set_external_connection( cid = "pgdb", rowset = 500, symbol = "&", )
See also
new_connection()
: Creates a new VerticaPy connection.