You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2024/08/08 00:41:42 UTC

(superset) branch elizabeth/more-report-tests updated: add mutator to get_columns_description

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch elizabeth/more-report-tests
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/elizabeth/more-report-tests by this push:
     new 0bf6c3560c add mutator to get_columns_description
0bf6c3560c is described below

commit 0bf6c3560cd1f025c0ad0158068b9c54a452793b
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Wed Aug 7 17:41:21 2024 -0700

    add mutator to get_columns_description
---
 superset/connectors/sqla/utils.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/connectors/sqla/utils.py b/superset/connectors/sqla/utils.py
index 87b3d5dd3a..18e5de48c1 100644
--- a/superset/connectors/sqla/utils.py
+++ b/superset/connectors/sqla/utils.py
@@ -144,8 +144,9 @@ def get_columns_description(
         with database.get_raw_connection(catalog=catalog, schema=schema) as conn:
             cursor = conn.cursor()
             query = database.apply_limit_to_sql(query, limit=1)
-            cursor.execute(query)
-            db_engine_spec.execute(cursor, query, database)
+            mutated_query = database.mutate_sql_based_on_config(query)
+            cursor.execute(mutated_query)
+            db_engine_spec.execute(cursor, mutated_query, database)
             result = db_engine_spec.fetch_data(cursor, limit=1)
             result_set = SupersetResultSet(result, cursor.description, db_engine_spec)
             return result_set.columns