PostgresConnector
Configuration
Prism uses the psycopg2-binary
module to instantiate and configure the Postgres connector. The required arguments rare:
id
: ID for your connector.autocommit
: toggle whether the connection commits changes to the database after executing. The default isTrue
.host
: the hostname of Postgres database.port
: the port number of the Postgres database.database
: the name of the database to which you want to connect.user
: the user name to use for authentication.password
: the password to use for authentication
execute_sql
execute_sql
You can run queries against the Postgres database using the execute_sql
function:
Note that when return_type = None
, the result will be a list tuples containing the query data.
Last updated