The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Put remarks at end of query instead of start (#76462)
Riley Thompson3617b2ce8bdc
diff --git a/modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj b/modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.cljindex 98609c40288..98a10f75005 100644--- a/modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj+++ b/modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj@@ -962,7 +962,7 @@(binding [bigquery.common/*bigquery-timezone-id* (effective-query-timezone-id database)](log/tracef "Running BigQuery query in %s timezone" bigquery.common/*bigquery-timezone-id*)(let [sql (if (:include-user-id-and-hash (driver.conn/effective-details database) true)- (str "-- " (driver-api/query->remark :bigquery-cloud-sdk outer-query) "\n" sql)+ (str sql "\n\n-- " (driver-api/query->remark :bigquery-cloud-sdk outer-query))sql)](*process-native* respond database sql params (driver-api/canceled-chan))))))diff --git a/modules/drivers/starburst/src/metabase/driver/starburst.clj b/modules/drivers/starburst/src/metabase/driver/starburst.cljindex c57bdd884f1..8d2a98ac5e5 100644--- a/modules/drivers/starburst/src/metabase/driver/starburst.clj+++ b/modules/drivers/starburst/src/metabase/driver/starburst.clj@@ -1004,3 +1004,9 @@(defmethod sql.qp/->honeysql [:starburst ::sql.qp/cast-to-text][driver [_ expr]](sql.qp/->honeysql driver [::sql.qp/cast expr "varchar"]))++;; starburst returns line numbers in error messages which will be off by 1 if+;; the remark is prepended (#64133)+(defmethod sql-jdbc.execute/inject-remark :starburst+ [_ sql remark]+ (str sql "\n\n-- " remark))