dipper.sources.PostgreSQLSource module¶
-
class
dipper.sources.PostgreSQLSource.
PostgreSQLSource
(graph_type, are_bnodes_skolemized, name=None)¶ Bases:
dipper.sources.Source.Source
Class for interfacing with remote Postgres databases
-
fetch_from_pgdb
(tables, cxn, limit=None, force=False)¶ - Will fetch all Postgres tables from the specified database
- in the cxn connection parameters.
- This will save them to a local file named the same as the table,
- in tab-delimited format, including a header.
Parameters: - tables – Names of tables to fetch
- cxn – database connection details
- limit – A max row count to fetch for each table
Returns: None
-
fetch_query_from_pgdb
(qname, query, con, cxn, limit=None, force=False)¶ Supply either an already established connection, or connection parameters. The supplied connection will override any separate cxn parameter :param qname: The name of the query to save the output to :param query: The SQL query itself :param con: The already-established connection :param cxn: The postgres connection information :param limit: If you only want a subset of rows from the query :return:
-