You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/13 09:28:43 UTC

[GitHub] villebro commented on issue #4412: Comment row at end of query in SQL Lab fails to render in Explore window

villebro commented on issue #4412: Comment row at end of query in SQL Lab fails to render in Explore window
URL: https://github.com/apache/incubator-superset/issues/4412#issuecomment-365203863
 
 
   Thanks, that looks much better:
   
   ```
   diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
   index b2e21c7d..5792498a 100644
   --- a/superset/connectors/sqla/models.py
   +++ b/superset/connectors/sqla/models.py
   @@ -423,7 +423,7 @@ class SqlaTable(Model, BaseDatasource):
        def get_from_clause(self, template_processor=None, db_engine_spec=None):
            # Supporting arbitrary SQL statements in place of tables
            if self.sql:
   -            from_sql = self.sql
   +            from_sql = sqlparse.format(self.sql, strip_comments=True)
                if template_processor:
                    from_sql = template_processor.process_template(from_sql)
                if db_engine_spec:
   ```
   
   <img width="1076" alt="screen shot 2018-02-13 at 11 27 39" src="https://user-images.githubusercontent.com/33317356/36142498-f23eb35c-10b0-11e8-8f7e-4d2e6a2f4ad8.png">
   
   Ok for PR?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services