You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/11/14 05:05:24 UTC
[incubator-superset] branch master updated: adding support for
getting list of foreign tables for PostgreSQL (#3856)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 630604b adding support for getting list of foreign tables for PostgreSQL (#3856)
630604b is described below
commit 630604bc6b80e39f286d2837d68cee40e38cb31a
Author: Mike Schiller <md...@gmail.com>
AuthorDate: Tue Nov 14 00:05:22 2017 -0500
adding support for getting list of foreign tables for PostgreSQL (#3856)
* adding support for getting list of foreign tables for PostgreSQL
* need extra newline to pass lint
---
superset/db_engine_specs.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 136b659..562f359 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -238,6 +238,13 @@ class PostgresEngineSpec(BaseEngineSpec):
def convert_dttm(cls, target_type, dttm):
return "'{}'".format(dttm.strftime('%Y-%m-%d %H:%M:%S'))
+ @classmethod
+ def get_table_names(cls, schema, inspector):
+ """Need to consider foreign tables for PostgreSQL"""
+ tables = inspector.get_table_names(schema)
+ tables.extend(inspector.get_foreign_table_names(schema))
+ return sorted(tables)
+
class Db2EngineSpec(BaseEngineSpec):
engine = 'ibm_db_sa'
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].