mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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
This commit is contained in:
parent
eb5d220b5e
commit
630604bc6b
@ -238,6 +238,13 @@ class PostgresEngineSpec(BaseEngineSpec):
|
|||||||
def convert_dttm(cls, target_type, dttm):
|
def convert_dttm(cls, target_type, dttm):
|
||||||
return "'{}'".format(dttm.strftime('%Y-%m-%d %H:%M:%S'))
|
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):
|
class Db2EngineSpec(BaseEngineSpec):
|
||||||
engine = 'ibm_db_sa'
|
engine = 'ibm_db_sa'
|
||||||
|
Loading…
Reference in New Issue
Block a user