Hi, Luiggi! I faced same issue... Here is troubleshooting log:
[54747da9-115d-4399-bb52-b8fda660e084] 2024-09-26T11:17:21+05:00 INFO metabase.api.dataset Source query for this query is Card 5
[54747da9-115d-4399-bb52-b8fda660e084] 2024-09-26T11:17:21+05:00 DEBUG metabase.server.middleware.log POST /api/dataset/query_metadata 200 98.0 ms (8 DB calls) App DB connections: 1/10 Jetty threads: 4/50 (3 idle, 0 queued) (103 total active threads) Queries in flight: 1 (0 queued) {:metabase-user-id 2}
[54747da9-115d-4399-bb52-b8fda660e084] 2024-09-26T11:17:22+05:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: ERROR: operator does not exist: character varying >= date
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Position: 745
{:database_id 2,
:started_at #t "2024-09-26T11:17:21.987336513+05:00[Asia/Yekaterinburg]",
:via
[{:status :failed,
:class clojure.lang.ExceptionInfo,
:error
"Error executing query: ERROR: operator does not exist: character varying >= date\n Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n Position: 745",
:stacktrace
["--> driver.sql_jdbc.execute$execute_reducible_query$fn__82139$fn__82140.invoke(execute.clj:716)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__82139.invoke(execute.clj:713)"
"driver.sql_jdbc.execute$fn__81932$fn__81933.invoke(execute.clj:397)"
"driver.sql_jdbc.execute$do_with_resolved_connection.invokeStatic(execute.clj:337)"
"driver.sql_jdbc.execute$do_with_resolved_connection.invoke(execute.clj:320)"
"driver.sql_jdbc.execute$fn__81932.invokeStatic(execute.clj:391)"
"driver.sql_jdbc.execute$fn__81932.invoke(execute.clj:389)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:707)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:693)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:704)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:693)"
"driver.sql_jdbc$fn__109980.invokeStatic(sql_jdbc.clj:77)"
"driver.sql_jdbc$fn__109980.invoke(sql_jdbc.clj:75)"
"query_processor.pipeline$_STAR_execute_STAR_.invokeStatic(pipeline.clj:47)"
"query_processor.pipeline$_STAR_execute_STAR_.invoke(pipeline.clj:34)"
"query_processor.pipeline$_STAR_run_STAR_.invokeStatic(pipeline.clj:97)"
"query_processor.pipeline$_STAR_run_STAR_.invoke(pipeline.clj:90)"
"query_processor.execute$run.invokeStatic(execute.clj:60)"
"query_processor.execute$run.invoke(execute.clj:54)"
"query_processor.middleware.update_used_cards$update_used_cards_BANG_$fn__70540.invoke(update_used_cards.clj:58)"
"query_processor.execute$add_native_form_to_result_metadata$fn__70555.invoke(execute.clj:23)"
"query_processor.execute$add_preprocessed_query_to_result_metadata_for_userland_query$fn__70560.invoke(execute.clj:34)"
"query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___70513.invoke(cache.clj:239)"
"query_processor.middleware.permissions$check_query_permissions$fn__63997.invoke(permissions.clj:119)"
"query_processor.middleware.enterprise$check_download_permissions_middleware$fn__64607.invoke(enterprise.clj:51)"
"query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__64617.invoke(enterprise.clj:64)"
"query_processor.execute$execute$fn__70587.invoke(execute.clj:92)"
"query_processor.setup$do_with_qp_setup.invokeStatic(setup.clj:225)"
"query_processor.setup$do_with_qp_setup.invoke(setup.clj:216)"
"query_processor.execute$execute.invokeStatic(execute.clj:91)"
"query_processor.execute$execute.invoke(execute.clj:87)"
"query_processor$process_query_STAR__STAR_.invokeStatic(query_processor.clj:47)"
"query_processor$process_query_STAR__STAR_.invoke(query_processor.clj:43)"
"query_processor.middleware.enterprise$fn__64634$handle_audit_app_internal_queries__64635$fn__64637.invoke(enterprise.clj:96)"
"query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__64645.invoke(enterprise.clj:103)"
"query_processor.middleware.process_userland_query$process_userland_query_middleware$fn__76328.invoke(process_userland_query.clj:198)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__76397.invoke(catch_exceptions.clj:128)"
"query_processor$process_query$fn__76434.invoke(query_processor.clj:78)"
"query_processor.setup$do_with_canceled_chan$fn__65049.invoke(setup.clj:189)"
"query_processor.setup$do_with_database_local_settings$fn__65044.invoke(setup.clj:181)"
"query_processor.setup$do_with_driver$fn__65039$fn__65040.invoke(setup.clj:166)"
"driver$do_with_driver.invokeStatic(driver.clj:104)"
"driver$do_with_driver.invoke(driver.clj:99)"
"query_processor.setup$do_with_driver$fn__65039.invoke(setup.clj:165)"
"query_processor.setup$do_with_metadata_provider$fn__65032$fn__65035.invoke(setup.clj:151)"
"query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:170)"
"query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
"query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:159)"
"query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
"query_processor.setup$do_with_metadata_provider$fn__65032.invoke(setup.clj:150)"
"query_processor.setup$do_with_resolved_database$fn__65026.invoke(setup.clj:128)"
"query_processor.setup$do_with_qp_setup.invokeStatic(setup.clj:232)"
"query_processor.setup$do_with_qp_setup.invoke(setup.clj:216)"
"query_processor$process_query.invokeStatic(query_processor.clj:76)"
"query_processor$process_query.invoke(query_processor.clj:69)"
"api.dataset$run_streaming_query$fn__97160.invoke(dataset.clj:84)"
"query_processor.streaming$_streaming_response$fn__68543$fn__68544$fn__68545.invoke(streaming.clj:175)"
"query_processor.streaming$_streaming_response$fn__68543$fn__68544.invoke(streaming.clj:174)"
"query_processor.streaming$do_with_streaming_rff.invokeStatic(streaming.clj:165)"
"query_processor.streaming$do_with_streaming_rff.invoke(streaming.clj:152)"
"query_processor.streaming$_streaming_response$fn__68543.invoke(streaming.clj:171)"
"async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:68)"
"async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:66)"
"async.streaming_response$do_f_async$task__51859.invoke(streaming_response.clj:87)"],
:error_type :invalid-query,
:ex-data
{:driver :postgres,
:sql
["-- Metabase:: userID: 2 queryType: MBQL queryHash: 60c3d7743ecb836927b74d28de864ac5cc6353f142ef08404f700df3631af1a3"
"SELECT"
" \"source\".\"_mb_row_id\" AS \"_mb_row_id\","
" \"source\".\"example\" AS \"example\","
" \"source\".\"pattern\" AS \"pattern\","
" \"source\".\"date\" AS \"date\","
" \"source\".\"status\" AS \"status\""
"FROM"
" ("
" SELECT"
" \"smsf\".\"upload_halotel_patterns_20240920114119\".\"_mb_row_id\" AS \"_mb_row_id\","
" \"smsf\".\"upload_halotel_patterns_20240920114119\".\"example\" AS \"example\","
" \"smsf\".\"upload_halotel_patterns_20240920114119\".\"pattern\" AS \"pattern\","
" \"smsf\".\"upload_halotel_patterns_20240920114119\".\"date\" AS \"date\","
" \"smsf\".\"upload_halotel_patterns_20240920114119\".\"status\" AS \"status\""
" FROM"
" \"smsf\".\"upload_halotel_patterns_20240920114119\""
" ) AS \"source\""
"WHERE"
" ("
" \"source\".\"date\" >= CAST((NOW() + INTERVAL '-1 day') AS date)"
" )"
" AND (\"source\".\"date\" < CAST(NOW() AS date))"
"LIMIT"
" 2000"],
:params nil,
:type :invalid-query}}],
:action_id nil,
:state "42883",
:error_type :invalid-query,
:json_query
{:database 2,
:type "query",
:query {:source-table "card__5", :filter ["time-interval" ["field" "date" {:base-type "type/Text"}] -1 "day"]},
:parameters [],
:middleware {:js-int-to-string? true, :userland-query? true, :add-default-userland-constraints? true}},
:native
{:query
"SELECT \"source\".\"_mb_row_id\" AS \"_mb_row_id\", \"source\".\"example\" AS \"example\", \"source\".\"pattern\" AS \"pattern\", \"source\".\"date\" AS \"date\", \"source\".\"status\" AS \"status\" FROM (SELECT \"smsf\".\"upload_halotel_patterns_20240920114119\".\"_mb_row_id\" AS \"_mb_row_id\", \"smsf\".\"upload_halotel_patterns_20240920114119\".\"example\" AS \"example\", \"smsf\".\"upload_halotel_patterns_20240920114119\".\"pattern\" AS \"pattern\", \"smsf\".\"upload_halotel_patterns_20240920114119\".\"date\" AS \"date\", \"smsf\".\"upload_halotel_patterns_20240920114119\".\"status\" AS \"status\" FROM \"smsf\".\"upload_halotel_patterns_20240920114119\") AS \"source\" WHERE (\"source\".\"date\" >= CAST((NOW() + INTERVAL '-1 day') AS date)) AND (\"source\".\"date\" < CAST(NOW() AS date)) LIMIT 2000",
:params nil},
:status :failed,
:class org.postgresql.util.PSQLException,
:stacktrace
["org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419)"
"org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:341)"
"org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:326)"
"org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:302)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:297)"
"com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)"
"--> driver.sql_jdbc.execute$fn__82058.invokeStatic(execute.clj:569)"
"driver.sql_jdbc.execute$fn__82058.invoke(execute.clj:567)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invokeStatic(execute.clj:577)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invoke(execute.clj:574)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__82139$fn__82140.invoke(execute.clj:714)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__82139.invoke(execute.clj:713)"
"driver.sql_jdbc.execute$fn__81932$fn__81933.invoke(execute.clj:397)"
"driver.sql_jdbc.execute$do_with_resolved_connection.invokeStatic(execute.clj:337)"
"driver.sql_jdbc.execute$do_with_resolved_connection.invoke(execute.clj:320)"
"driver.sql_jdbc.execute$fn__81932.invokeStatic(execute.clj:391)"
"driver.sql_jdbc.execute$fn__81932.invoke(execute.clj:389)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:707)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:693)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:704)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:693)"
"driver.sql_jdbc$fn__109980.invokeStatic(sql_jdbc.clj:77)"
"driver.sql_jdbc$fn__109980.invoke(sql_jdbc.clj:75)"
"query_processor.pipeline$_STAR_execute_STAR_.invokeStatic(pipeline.clj:47)"
"query_processor.pipeline$_STAR_execute_STAR_.invoke(pipeline.clj:34)"
"query_processor.pipeline$_STAR_run_STAR_.invokeStatic(pipeline.clj:97)"
"query_processor.pipeline$_STAR_run_STAR_.invoke(pipeline.clj:90)"
"query_processor.execute$run.invokeStatic(execute.clj:60)"
"query_processor.execute$run.invoke(execute.clj:54)"
"query_processor.middleware.update_used_cards$update_used_cards_BANG_$fn__70540.invoke(update_used_cards.clj:58)"
"query_processor.execute$add_native_form_to_result_metadata$fn__70555.invoke(execute.clj:23)"
"query_processor.execute$add_preprocessed_query_to_result_metadata_for_userland_query$fn__70560.invoke(execute.clj:34)"
"query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___70513.invoke(cache.clj:239)"
"query_processor.middleware.permissions$check_query_permissions$fn__63997.invoke(permissions.clj:119)"
"query_processor.middleware.enterprise$check_download_permissions_middleware$fn__64607.invoke(enterprise.clj:51)"
"query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__64617.invoke(enterprise.clj:64)"
"query_processor.execute$execute$fn__70587.invoke(execute.clj:92)"
"query_processor.setup$do_with_qp_setup.invokeStatic(setup.clj:225)"
"query_processor.setup$do_with_qp_setup.invoke(setup.clj:216)"
"query_processor.execute$execute.invokeStatic(execute.clj:91)"
"query_processor.execute$execute.invoke(execute.clj:87)"
"query_processor$process_query_STAR__STAR_.invokeStatic(query_processor.clj:47)"
"query_processor$process_query_STAR__STAR_.invoke(query_processor.clj:43)"
"query_processor.middleware.enterprise$fn__64634$handle_audit_app_internal_queries__64635$fn__64637.invoke(enterprise.clj:96)"
"query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__64645.invoke(enterprise.clj:103)"
"query_processor.middleware.process_userland_query$process_userland_query_middleware$fn__76328.invoke(process_userland_query.clj:198)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__76397.invoke(catch_exceptions.clj:128)"
"query_processor$process_query$fn__76434.invoke(query_processor.clj:78)"
"query_processor.setup$do_with_canceled_chan$fn__65049.invoke(setup.clj:189)"
"query_processor.setup$do_with_database_local_settings$fn__65044.invoke(setup.clj:181)"
"query_processor.setup$do_with_driver$fn__65039$fn__65040.invoke(setup.clj:166)"
"driver$do_with_driver.invokeStatic(driver.clj:104)"
"driver$do_with_driver.invoke(driver.clj:99)"
"query_processor.setup$do_with_driver$fn__65039.invoke(setup.clj:165)"
"query_processor.setup$do_with_metadata_provider$fn__65032$fn__65035.invoke(setup.clj:151)"
"query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:170)"
"query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
"query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:159)"
"query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
"query_processor.setup$do_with_metadata_provider$fn__65032.invoke(setup.clj:150)"
"query_processor.setup$do_with_resolved_database$fn__65026.invoke(setup.clj:128)"
"query_processor.setup$do_with_qp_setup.invokeStatic(setup.clj:232)"
"query_processor.setup$do_with_qp_setup.invoke(setup.clj:216)"
"query_processor$process_query.invokeStatic(query_processor.clj:76)"
"query_processor$process_query.invoke(query_processor.clj:69)"
"api.dataset$run_streaming_query$fn__97160.invoke(dataset.clj:84)"
"query_processor.streaming$_streaming_response$fn__68543$fn__68544$fn__68545.invoke(streaming.clj:175)"
"query_processor.streaming$_streaming_response$fn__68543$fn__68544.invoke(streaming.clj:174)"
"query_processor.streaming$do_with_streaming_rff.invokeStatic(streaming.clj:165)"
"query_processor.streaming$do_with_streaming_rff.invoke(streaming.clj:152)"
"query_processor.streaming$_streaming_response$fn__68543.invoke(streaming.clj:171)"
"async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:68)"
"async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:66)"
"async.streaming_response$do_f_async$task__51859.invoke(streaming_response.clj:87)"],
:card_id 5,
:context :ad-hoc,
:error
"ERROR: operator does not exist: character varying >= date\n Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n Position: 745",
:row_count 0,
:running_time 0,
:preprocessed
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:middleware {:js-int-to-string? true, :userland-query? true, :add-default-userland-constraints? true},
:qp/source-card-id 5,
:info
{:executed-by 2,
:context :ad-hoc,
:card-id 5,
:metadata/model-metadata
[{:semantic_type :type/PK,
:name "_mb_row_id",
:field_ref [:field 9251 nil],
:effective_type :type/BigInteger,
:id 9251,
:visibility_type :normal,
:display_name "id",
:base_type :type/BigInteger}
{:semantic_type :type/Category,
:name "example",
:field_ref [:field 9254 nil],
:effective_type :type/Text,
:id 9254,
:visibility_type :normal,
:display_name "Example",
:fingerprint
{:global {:distinct-count 13, :nil% 0.0},
:type
{:type/Text
{:percent-json 0.0,
:percent-url 0.0,
:percent-email 0.0,
:percent-state 0.0,
:average-length 32.61538461538461}}},
:base_type :type/Text}
{:semantic_type :type/Category,
:name "pattern",
:field_ref [:field 9252 nil],
:effective_type :type/Text,
:id 9252,
:visibility_type :normal,
:display_name "Pattern",
:fingerprint
{:global {:distinct-count 12, :nil% 0.1538461538461538},
:type
{:type/Text
{:percent-json 0.0,
:percent-url 0.0,
:percent-email 0.0,
:percent-state 0.0,
:average-length 21.846153846153847}}},
:base_type :type/Text}
{:semantic_type :type/CreationTimestamp,
:unit :default,
:name "date",
:settings {:time_enabled "minutes", :date_style "D MMMM, YYYY"},
:field_ref [:field 9255 {:temporal-unit :default}],
:effective_type :type/Text,
:id 9255,
:visibility_type :normal,
:display_name "Date",
:fingerprint
{:global {:distinct-count 3, :nil% 0.0},
:type
{:type/Text {:percent-json 0.0, :percent-url 0.0, :percent-email 0.0, :percent-state 0.0, :average-length 10.0}}},
:base_type :type/Text}
{:semantic_type :type/Category,
:name "status",
:field_ref [:field 9253 nil],
:effective_type :type/Text,
:id 9253,
:visibility_type :normal,
:display_name "Status",
:fingerprint
{:global {:distinct-count 2, :nil% 0.0},
:type
{:type/Text {:percent-json 0.0, :percent-url 0.0, :percent-email 0.0, :percent-state 0.0, :average-length 7.0}}},
:base_type :type/Text}]},
:database 2,
:type :query,
:query
{:qp/stage-had-source-card 5,
:source-query/model? true,
:filter
[:and
[:>= [:field "date" {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime -1 :day]]
[:< [:field "date" {:base-type :type/Text, :temporal-unit :default}] [:relative-datetime 0 :day]]],
:source-metadata
[{:database_type "bigserial",
:semantic_type :type/PK,
:table_id 802,
:name "_mb_row_id",
:field_ref [:field 9251 nil],
:effective_type :type/BigInteger,
:id 9251,
:position 0,
:visibility_type :normal,
:display_name "id",
:base_type :type/BigInteger}
{:database_type "varchar",
:semantic_type :type/Category,
:table_id 802,
:name "example",
:field_ref [:field 9254 nil],
:effective_type :type/Text,
:id 9254,
:position 1,
:visibility_type :normal,
:display_name "Example",
:fingerprint
{:global {:distinct-count 13, :nil% 0.0},
:type
{:type/Text
{:percent-json 0.0,
:percent-url 0.0,
:percent-email 0.0,
:percent-state 0.0,
:average-length 32.61538461538461}}},
:base_type :type/Text}
{:database_type "varchar",
:semantic_type :type/Category,
:table_id 802,
:name "pattern",
:field_ref [:field 9252 nil],
:effective_type :type/Text,
:id 9252,
:position 2,
:visibility_type :normal,
:display_name "Pattern",
:fingerprint
{:global {:distinct-count 12, :nil% 0.1538461538461538},
:type
{:type/Text
{:percent-json 0.0,
:percent-url 0.0,
:percent-email 0.0,
:percent-state 0.0,
:average-length 21.846153846153847}}},
:base_type :type/Text}
{:database_type "varchar",
:semantic_type :type/CreationTimestamp,
:table_id 802,
:unit :default,
:name "date",
:settings {:time_enabled "minutes", :date_style "D MMMM, YYYY"},
:field_ref [:field 9255 {:temporal-unit :default}],
:effective_type :type/Text,
:id 9255,
:position 3,
:visibility_type :normal,
:display_name "Date",
:fingerprint
{:global {:distinct-count 3, :nil% 0.0},
:type
{:type/Text {:percent-json 0.0, :percent-url 0.0, :percent-email 0.0, :percent-state 0.0, :average-length 10.0}}},
:base_type :type/Text}
{:database_type "varchar",
:semantic_type :type/Category,
:table_id 802,
:name "status",
:field_ref [:field 9253 nil],
:effective_type :type/Text,
:id 9253,
:position 4,
:visibility_type :normal,
:display_name "Status",
:fingerprint
{:global {:distinct-count 2, :nil% 0.0},
:type
{:type/Text {:percent-json 0.0, :percent-url 0.0, :percent-email 0.0, :percent-state 0.0, :average-length 7.0}}},
:base_type :type/Text}],
:fields [[:field 9251 nil] [:field 9254 nil] [:field 9252 nil] [:field 9255 nil] [:field 9253 nil]],
:source-query
{:source-table 802,
:qp/stage-is-from-source-card 5,
:fields
[[:field 9251 nil] [:field 9254 nil] [:field 9252 nil] [:field 9255 {:temporal-unit :default}] [:field 9253 nil]]},
:limit 2000,
:metabase.query-processor.middleware.limit/original-limit nil}},
:data {:rows [], :cols []}}