Snowflake varchar ISO8601 datetime filter issue

I have timestamps like this in a varchar column:
2024-11-08T19:21:07Z

I've tried to use casting:
image

Metabase displays these correctly,

image

but when I try to use the datefilter widget, it won't generate the query and I get this error.

image

Any ideas how to get the datefilter to work correctly?

These are the logs:
[eaee5184-6ac0-44b6-b0c9-bd40ba4a4a84] 2024-11-08T16:02:03-05:00 ERROR metabase.server.middleware.log POST /api/dataset/native 500 26.0 ms (5 DB calls) {:metabase-user-id 1}
{:via
[{:type clojure.lang.ExceptionInfo,
:message "Error compiling query: No matching clause: :type/Text",
:data
{:query
{:database 12,
:type :query,
:query
{:source-table 438,
:fields
[[:field 13697 nil]
[:field 13702 nil]
[:field 13699 nil]
[:field 13688 nil]
[:field 13706 nil]
[:field 13693 nil]
[:field 13696 nil]
[:field 13701 nil]
[:field 13687 nil]
[:field 13698 nil]
[:field 13691 nil]
[:field 13695 nil]
[:field 13690 nil]
[:field 13694 nil]
[:field 13705 nil]
[:field 13700 nil]
[:field 13704 nil]
[:field 13703 nil]
[:field 13692 nil]
[:field 13689 nil]],
:filter
[:and
[:>= [:field 13704 {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime -7 :day]]
[:< [:field 13704 {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime 0 :day]]],
:limit 1048575,
:metabase.query-processor.middleware.limit/original-limit nil}},
:type :driver},
:at [metabase.query_processor.compile$compile_preprocessed75746__75747$fn__75748 invoke "compile.clj" 35]}
{:type java.lang.IllegalArgumentException,
:message "No matching clause: :type/Text",
:at
[metabase.query_processor.util.relative_datetime$maybe_truncate_dt_value invokeStatic "relative_datetime.clj" 18]}],
:trace
[[metabase.query_processor.util.relative_datetime$maybe_truncate_dt_value invokeStatic "relative_datetime.clj" 18]
[metabase.query_processor.util.relative_datetime$maybe_truncate_dt_value invoke "relative_datetime.clj" 16]
[metabase.query_processor.util.relative_datetime$relative_datetime_sql_str invokeStatic "relative_datetime.clj" 30]
[metabase.query_processor.util.relative_datetime$relative_datetime_sql_str invoke "relative_datetime.clj" 23]
[metabase.query_processor.util.relative_datetime$maybe_cacheable_relative_datetime_honeysql
invokeStatic
"relative_datetime.clj"
44]
[metabase.query_processor.util.relative_datetime$maybe_cacheable_relative_datetime_honeysql
doInvoke
"relative_datetime.clj"
33]
[clojure.lang.RestFn invoke "RestFn.java" 470]
[metabase.driver.snowflake$fn__125206 invokeStatic "snowflake.clj" 478]
[metabase.driver.snowflake$fn__125206 invoke "snowflake.clj" 476]
[clojure.lang.MultiFn invoke "MultiFn.java" 234]
[metabase.driver.sql.query_processor$fn__70446$fn__70448 invoke "query_processor.clj" 1433]
[clojure.lang.MultiFn invoke "MultiFn.java" 234]
[clojure.core$partial$fn__5927 invoke "core.clj" 2641]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2759]
[clojure.lang.PersistentVector$ChunkedSeq reduce "PersistentVector.java" 549]
[clojure.core$transduce invokeStatic "core.clj" 7025]
[clojure.core$into invokeStatic "core.clj" 7042]
[clojure.core$into invoke "core.clj" 7029]
[metabase.driver.sql.query_processor$fn__70497 invokeStatic "query_processor.clj" 1464]
[metabase.driver.sql.query_processor$fn__70497 invoke "query_processor.clj" 1462]
[clojure.lang.MultiFn invoke "MultiFn.java" 234]
[metabase.driver.sql.query_processor$fn__70515 invokeStatic "query_processor.clj" 1485]
[metabase.driver.sql.query_processor$fn__70515 invoke "query_processor.clj" 1483]
[clojure.lang.MultiFn invoke "MultiFn.java" 244]
[metabase.driver.sql.query_processor$apply_top_level_clauses$fn__70622 invoke "query_processor.clj" 1719]
[clojure.lang.ArraySeq reduce "ArraySeq.java" 119]
[clojure.core$transduce invokeStatic "core.clj" 7025]
[clojure.core$transduce invoke "core.clj" 7012]
[metabase.driver.sql.query_processor$apply_top_level_clauses invokeStatic "query_processor.clj" 1713]
[metabase.driver.sql.query_processor$apply_top_level_clauses invoke "query_processor.clj" 1706]
[metabase.driver.sql.query_processor$apply_top_level_clauses invokeStatic "query_processor.clj" 1710]
[metabase.driver.sql.query_processor$apply_top_level_clauses invoke "query_processor.clj" 1706]
[metabase.driver.sql.query_processor$apply_clauses invokeStatic "query_processor.clj" 1776]
[metabase.driver.sql.query_processor$apply_clauses invoke "query_processor.clj" 1764]
[metabase.driver.sql.query_processor$mbql__GT_honeysql70675__70677 invokeStatic "query_processor.clj" 1829]
[metabase.driver.sql.query_processor$mbql__GT_honeysql70675__70677 invoke "query_processor.clj" 1822]
[metabase.driver.sql.query_processor$mbql__GT_native70686__70687 invokeStatic "query_processor.clj" 1842]
[metabase.driver.sql.query_processor$mbql__GT_native70686__70687 invoke "query_processor.clj" 1835]
[metabase.driver.sql$fn__87989 invokeStatic "sql.clj" 47]
[metabase.driver.sql$fn__87989 invoke "sql.clj" 45]
[clojure.lang.MultiFn invoke "MultiFn.java" 234]
[metabase.query_processor.compile$compile_STAR_ invokeStatic "compile.clj" 24]
[metabase.query_processor.compile$compile_STAR_ invoke "compile.clj" 20]
[metabase.query_processor.compile$compile_preprocessed75746__75747$fn__75748 invoke "compile.clj" 32]
[metabase.query_processor.setup$do_with_qp_setup75135__75136 invokeStatic "setup.clj" 225]
[metabase.query_processor.setup$do_with_qp_setup75135__75136 invoke "setup.clj" 216]
[metabase.query_processor.compile$compile_preprocessed75746__75747 invokeStatic "compile.clj" 30]
[metabase.query_processor.compile$compile_preprocessed75746__75747 invoke "compile.clj" 26]
[metabase.query_processor.compile$compile75753__75754$fn__75755 invoke "compile.clj" 43]
[metabase.query_processor.setup$do_with_canceled_chan75130__75131$fn__75132 invoke "setup.clj" 189]
[metabase.query_processor.setup$do_with_database_local_settings75123__75124$fn__75125 invoke "setup.clj" 181]
[metabase.query_processor.setup$do_with_driver75116__75117$fn__75118$fn__75119 invoke "setup.clj" 166]
[metabase.driver$do_with_driver invokeStatic "driver.clj" 106]
[metabase.driver$do_with_driver invoke "driver.clj" 101]
[metabase.query_processor.setup$do_with_driver75116__75117$fn__75118 invoke "setup.clj" 165]
[metabase.query_processor.setup$do_with_metadata_provider75107__75108$fn__75109$fn__75112 invoke "setup.clj" 151]
[metabase.query_processor.store$do_with_metadata_provider58710__58711 invokeStatic "store.clj" 170]
[metabase.query_processor.store$do_with_metadata_provider58710__58711 invoke "store.clj" 150]
[metabase.query_processor.store$do_with_metadata_provider58710__58711 invokeStatic "store.clj" 159]
[metabase.query_processor.store$do_with_metadata_provider58710__58711 invoke "store.clj" 150]
[metabase.query_processor.setup$do_with_metadata_provider75107__75108$fn__75109 invoke "setup.clj" 150]
[metabase.query_processor.setup$do_with_resolved_database75097__75098$fn__75099 invoke "setup.clj" 128]
[metabase.query_processor.setup$do_with_qp_setup75135__75136 invokeStatic "setup.clj" 232]
[metabase.query_processor.setup$do_with_qp_setup75135__75136 invoke "setup.clj" 216]
[metabase.query_processor.compile$compile75753__75754 invokeStatic "compile.clj" 42]
[metabase.query_processor.compile$compile75753__75754 invoke "compile.clj" 39]
[metabase.query_processor.compile$compile_with_inline_parameters75764__75765 invokeStatic "compile.clj" 74]
[metabase.query_processor.compile$compile_with_inline_parameters75764__75765 invoke "compile.clj" 64]
[metabase.api.dataset$fn__98842$fn__98845 invoke "dataset.clj" 176]
[metabase.api.dataset$fn__98842 invokeStatic "dataset.clj" 172]
[metabase.api.dataset$fn__98842 invoke "dataset.clj" 167]
[compojure.core$wrap_response$fn__53940 invoke "core.clj" 160]
[compojure.core$wrap_route_middleware$fn__53924 invoke "core.clj" 132]
[compojure.core$wrap_route_info$fn__53929 invoke "core.clj" 139]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 151]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 152]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 152]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 152]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 152]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952 invoke "core.clj" 200]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[metabase.server.middleware.auth$enforce_authentication$fn__102156 invoke "auth.clj" 18]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952 invoke "core.clj" 200]
[compojure.core$make_context$handler__53980 invoke "core.clj" 290]
[compojure.core$make_context$fn__53984 invoke "core.clj" 300]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$make_context$fn__53984 invoke "core.clj" 301]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.AFunction$1 doInvoke "AFunction.java" 33]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 153]
[clojure.lang.Var invoke "Var.java" 395]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[metabase.api.routes$fn__107556$fn__107559 invoke "routes.clj" 73]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952 invoke "core.clj" 200]
[clojure.lang.AFn applyToHelper "AFn.java" 160]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 662]
[metabase.server.routes$fn__107836$fn__107837 doInvoke "routes.clj" 73]
[clojure.lang.RestFn invoke "RestFn.java" 439]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952 invoke "core.clj" 200]
[compojure.core$make_context$handler__53980 invoke "core.clj" 290]
[compojure.core$make_context$fn__53984 invoke "core.clj" 300]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 153]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 153]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 153]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[compojure.core$wrap_route_matches$fn__53933 invoke "core.clj" 153]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952$f__53953$respond_SINGLEQUOTE___53954 invoke "core.clj" 197]
[metabase.server.routes$fn__107819$fn__107821 invoke "routes.clj" 47]
[compojure.core$routes$fn__53952$f__53953 invoke "core.clj" 198]
[compojure.core$routes$fn__53952 invoke "core.clj" 200]
[metabase.server.middleware.exceptions$catch_uncaught_exceptions$fn__104276 invoke "exceptions.clj" 111]
[metabase.server.middleware.exceptions$catch_api_exceptions$fn__104273 invoke "exceptions.clj" 100]
[metabase.server.middleware.log$log_api_call$fn__108169$fn__108170$fn__108171 invoke "log.clj" 233]
[metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info invokeStatic "diagnostic.clj" 17]
[metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info invoke "diagnostic.clj" 12]
[metabase.server.middleware.log$log_api_call$fn__108169$fn__108170 invoke "log.clj" 224]
[toucan2.execute$do_with_call_counts invokeStatic "execute.clj" 112]
[toucan2.execute$do_with_call_counts invoke "execute.clj" 103]
[metabase.server.middleware.log$log_api_call$fn__108169 invoke "log.clj" 223]
[metabase.server.middleware.browser_cookie$ensure_browser_id_cookie$fn__111690 invoke "browser_cookie.clj" 40]
[metabase.server.middleware.security$add_security_headers$fn__104232 invoke "security.clj" 273]
[ring.middleware.json$wrap_json_body$fn__111949 invoke "json.clj" 64]
[metabase.server.middleware.offset_paging$handle_paging$fn__92238 invoke "offset_paging.clj" 49]
[metabase.server.middleware.json$wrap_streamed_json_response$fn__55611 invoke "json.clj" 88]
[ring.middleware.keyword_params$wrap_keyword_params$fn__112038 invoke "keyword_params.clj" 55]
[ring.middleware.params$wrap_params$fn__112057 invoke "params.clj" 77]
[metabase.server.middleware.misc$maybe_set_site_url$fn__71666 invoke "misc.clj" 59]
[metabase.server.middleware.session$reset_session_timeout$fn__73471 invoke "session.clj" 565]
[metabase.server.middleware.session$bind_current_user$fn__73437$fn__73438 invoke "session.clj" 459]
[metabase.server.middleware.session$do_with_current_user invokeStatic "session.clj" 438]
[metabase.server.middleware.session$do_with_current_user invoke "session.clj" 421]
[metabase.server.middleware.session$bind_current_user$fn__73437 invoke "session.clj" 458]
[metabase.server.middleware.session$wrap_current_user_info$fn__73414 invoke "session.clj" 383]
[metabase.analytics.sdk$embedding_mw$embedding_mw_fn__77618 invoke "sdk.clj" 51]
[metabase.server.middleware.session$wrap_session_id$fn__73386 invoke "session.clj" 261]
[metabase.server.middleware.auth$wrap_static_api_key$fn__102164 invoke "auth.clj" 32]
[ring.middleware.cookies$wrap_cookies$fn__111877 invoke "cookies.clj" 200]
[metabase.server.middleware.misc$add_content_type$fn__71648 invoke "misc.clj" 28]
[metabase.server.middleware.misc$disable_streaming_buffering$fn__71674 invoke "misc.clj" 75]
[ring.middleware.gzip$wrap_gzip$fn__111919 invoke "gzip.clj" 86]
[metabase.server.middleware.request_id$wrap_request_id$fn__107898 invoke "request_id.clj" 9]
[metabase.server.middleware.misc$bind_request$fn__71677 invoke "misc.clj" 91]
[metabase.server.middleware.ssl$redirect_to_https_middleware$fn__111706 invoke "ssl.clj" 51]
[metabase.server$async_proxy_handler$fn__61858 invoke "server.clj" 77]
[metabase.server.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a handle nil -1]
[org.eclipse.jetty.server.handler.StatisticsHandler handle "StatisticsHandler.java" 173]
[org.eclipse.jetty.server.handler.HandlerWrapper handle "HandlerWrapper.java" 122]
[org.eclipse.jetty.server.Server handle "Server.java" 563]
[org.eclipse.jetty.server.HttpChannel$RequestDispatchable dispatch "HttpChannel.java" 1598]
[org.eclipse.jetty.server.HttpChannel dispatch "HttpChannel.java" 753]
[org.eclipse.jetty.server.HttpChannel handle "HttpChannel.java" 501]
[org.eclipse.jetty.server.HttpConnection onFillable "HttpConnection.java" 287]
[org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 314]
[org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 100]
[org.eclipse.jetty.io.SelectableChannelEndPoint$1 run "SelectableChannelEndPoint.java" 53]
[org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy runTask "AdaptiveExecutionStrategy.java" 421]
[org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy consumeTask "AdaptiveExecutionStrategy.java" 390]
[org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy tryProduce "AdaptiveExecutionStrategy.java" 277]
[org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy run "AdaptiveExecutionStrategy.java" 199]
[org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread run "ReservedThreadExecutor.java" 411]
[org.eclipse.jetty.util.thread.QueuedThreadPool runJob "QueuedThreadPool.java" 969]
[org.eclipse.jetty.util.thread.QueuedThreadPool$Runner doRunJob "QueuedThreadPool.java" 1194]
[org.eclipse.jetty.util.thread.QueuedThreadPool$Runner run "QueuedThreadPool.java" 1149]
[java.lang.Thread run "Thread.java" 829]],
:cause "No matching clause: :type/Text",
:message "Error compiling query: No matching clause: :type/Text",
:query
{:database 12,
:type :query,
:query
{:source-table 438,
:fields
[[:field 13697 nil]
[:field 13702 nil]
[:field 13699 nil]
[:field 13688 nil]
[:field 13706 nil]
[:field 13693 nil]
[:field 13696 nil]
[:field 13701 nil]
[:field 13687 nil]
[:field 13698 nil]
[:field 13691 nil]
[:field 13695 nil]
[:field 13690 nil]
[:field 13694 nil]
[:field 13705 nil]
[:field 13700 nil]
[:field 13704 nil]
[:field 13703 nil]
[:field 13692 nil]
[:field 13689 nil]],
:filter
[:and
[:>= [:field 13704 {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime -7 :day]]
[:< [:field 13704 {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime 0 :day]]],
:limit 1048575,
:metabase.query-processor.middleware.limit/original-limit nil}}}

Configuration Info:
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0",
"vendor": "Google Inc."
},
"metabase-info": {
"databases": [
"h2",
"oracle",
"mysql",
"snowflake"
],
"run-mode": "prod",
"plan-alias": "",
"version": {
"date": "2024-11-04",
"tag": "v0.51.2",
"hash": "8bdb22c"
},
"settings": {
"report-timezone": null
},
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MySQL",
"version": "8.0.36"
},
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.7.10"
}
}
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.24+8-LTS",
"java.vendor": "Red Hat, Inc.",
"java.vendor.url": "https://www.redhat.com/",
"java.version": "11.0.24",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.24+8-LTS",
"os.name": "Linux",
"os.version": "4.18.0-553.22.1.el8_10.x86_64",
"user.language": "en",
"user.timezone": "America/New_York"
}
}

Ok, so it looks like the relative dates function of the datefilter do not work, but the others do.

This doesn't work and I get the error generating query.
image

It should generate this where clause instead:
CAST("DW"."APPLICATION"."captureTime" AS timestamp) >= DATEADD(day, -7, CURRENT_DATE)

However, this works as expected:
image

It generates the following SQL
CAST(
"DW"."APPLICATION"."captureTime" AS timestamp
) < '2024-11-08 00:00:00.000':: timestamp_ntz

So does this:
image

It generates the following SQL
AND (
CAST(
"DW"."APPLICATION"."captureTime" AS timestamp
) >= '2024-10-09 00:00:00.000':: timestamp_ntz
)
AND (
CAST(
"DW"."APPLICATION"."captureTime" AS timestamp
) < '2024-11-09 00:00:00.000':: timestamp_ntz
)

1 Like

Did you ever solve this?