diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py index fae9c58b56..db48761ef1 100644 --- a/superset/db_engine_specs.py +++ b/superset/db_engine_specs.py @@ -571,7 +571,7 @@ class PrestoEngineSpec(BaseEngineSpec): return part_field, cls._latest_partition_from_df(df) @classmethod - def latest_sub_partition(cls, table_name, schema, database, **kwargs): + def latest_sub_partition(cls, table_name, schema, database, **kwargs): """Returns the latest (max) partition value for a table A filtering criteria should be passed for all fields that are @@ -740,7 +740,7 @@ class HiveEngineSpec(PrestoEngineSpec): return False @classmethod - def latest_sub_partition(cls, table_name, **kwargs): + def latest_sub_partition(cls, table_name, schema, database, **kwargs): # TODO(bogdan): implement` pass diff --git a/superset/jinja_context.py b/superset/jinja_context.py index 11764c027d..e096ded2d5 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -124,7 +124,10 @@ class PrestoTemplateProcessor(BaseTemplateProcessor): def latest_sub_partition(self, table_name, **kwargs): table_name, schema = self._schema_table(table_name, self.schema) return self.database.db_engine_spec.latest_sub_partition( - table_name, schema, self.database, kwargs) + table_name=table_name, + schema=schema, + database=self.database, + **kwargs) class HiveTemplateProcessor(PrestoTemplateProcessor):