Hi again,
The log associated with the error seems to be the following
[df6e088a-ae30-4914-be49-116383327fa6] 2022-09-12T14:16:47+02:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: ERROR: canceling statement due to user request
{:database_id 2,
:started_at #t "2022-09-12T12:16:45.207461Z[UTC]",
:via
[{:status :failed,
:class clojure.lang.ExceptionInfo,
:error "Error executing query: ERROR: canceling statement due to user request",
:stacktrace
["--> driver.sql_jdbc.execute$execute_reducible_query$fn__55230.invoke(execute.clj:502)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:499)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:486)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:494)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:486)"
"driver.sql_jdbc$fn__85194.invokeStatic(sql_jdbc.clj:54)"
"driver.sql_jdbc$fn__85194.invoke(sql_jdbc.clj:52)"
"query_processor.context$executef.invokeStatic(context.clj:59)"
"query_processor.context$executef.invoke(context.clj:48)"
"query_processor.context.default$default_runf.invokeStatic(default.clj:67)"
"query_processor.context.default$default_runf.invoke(default.clj:65)"
"query_processor.context$runf.invokeStatic(context.clj:45)"
"query_processor.context$runf.invoke(context.clj:39)"
"query_processor.reducible$identity_qp.invokeStatic(reducible.clj:12)"
"query_processor.reducible$identity_qp.invoke(reducible.clj:9)"
"query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:193)"
"query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)"
"query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___52607.invoke(cache.clj:219)"
"query_processor.middleware.permissions$check_query_permissions$fn__48131.invoke(permissions.clj:109)"
"query_processor.middleware.mbql_to_native$mbql__GT_native$fn__51552.invoke(mbql_to_native.clj:23)"
"query_processor$fn__54083$combined_post_process__54088$combined_post_process_STAR___54089.invoke(query_processor.clj:212)"
"query_processor$fn__54083$combined_pre_process__54084$combined_pre_process_STAR___54085.invoke(query_processor.clj:209)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52528$fn__52533.invoke(resolve_database_and_driver.clj:35)"
"driver$do_with_driver.invokeStatic(driver.clj:75)"
"driver$do_with_driver.invoke(driver.clj:71)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52528.invoke(resolve_database_and_driver.clj:34)"
"query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__48563.invoke(fetch_source_query.clj:346)"
"query_processor.middleware.store$initialize_store$fn__48751$fn__48752.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:44)"
"query_processor.store$do_with_store.invoke(store.clj:38)"
"query_processor.middleware.store$initialize_store$fn__48751.invoke(store.clj:10)"
"query_processor.middleware.normalize_query$normalize$fn__52800.invoke(normalize_query.clj:22)"
"query_processor.middleware.constraints$add_default_userland_constraints$fn__49833.invoke(constraints.clj:53)"
"query_processor.middleware.process_userland_query$process_userland_query$fn__52739.invoke(process_userland_query.clj:145)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__53111.invoke(catch_exceptions.clj:167)"
"query_processor.reducible$async_qp$qp_STAR___44972$thunk__44974.invoke(reducible.clj:100)"
"query_processor.reducible$async_qp$qp_STAR___44972$fn__44976.invoke(reducible.clj:105)"],
:error_type :invalid-query,
:ex-data
{:sql
"-- Metabase\nSELECT (CAST(sum(CASE WHEN \"public\".\"candidatures_echelle_locale\".\"état\" = ? THEN 1 ELSE 0.0 END) AS float) / CASE WHEN count(*) = 0 THEN NULL ELSE count(*) END) AS \"candidatures acceptée\" FROM \"public\".\"candidatures_echelle_locale\" WHERE (\"public\".\"candidatures_echelle_locale\".\"injection_ai\" = 0 AND \"public\".\"candidatures_echelle_locale\".\"origine_détaillée\" = ? AND (\"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ?) AND \"public\".\"candidatures_echelle_locale\".\"date_candidature\" >= date_trunc('year', (now() + (INTERVAL '-1 year'))) AND \"public\".\"candidatures_echelle_locale\".\"date_candidature\" < date_trunc('year', now()) AND \"public\".\"candidatures_echelle_locale\".\"dept_org\" = ?)",
:params ("Candidature acceptée" "Prescripteur habilité PE" "AI" "ACI" "EI" "EITI" "ETTI" "93 - Seine-Saint-Denis"),
:type :invalid-query}}],
:state "57014",
:error_type :invalid-query,
:json_query
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true, :ignore-cached-results? false},
:database 2,
:query
{:source-table 792,
:filter
[:and
[:= [:field 11961 nil] 0]
[:= [:field 11952 nil] "Prescripteur habilité PE"]
[:= [:field 12007 nil] "AI" "ACI" "EI" "EITI" "ETTI"]],
:aggregation
[[:aggregation-options
[:/ [:count-where [:= [:field 11955 nil] "Candidature acceptée"]] [:count]]
{:name "candidatures acceptée", :display-name "candidatures acceptée"}]]},
:parameters
[{:type :category,
:slug "prescripteur",
:id "6957b229",
:value "Prescripteur habilité PE",
:target [:dimension [:field 11952 nil]]}
{:type :date/relative,
:slug "filtre_temporel_(ann%C3%A9e%2Fmois%2Fsemaine)",
:id "14cf843c",
:value "past1years",
:target [:dimension [:field 11954 nil]]}
{:type :string/=,
:slug "d%C3%A9partement",
:id "16a71fe5",
:value ["93 - Seine-Saint-Denis"],
:target [:dimension [:field 12670 nil]]}],
:async? true,
:cache-ttl 1242},
:native
{:query
"SELECT (CAST(sum(CASE WHEN \"public\".\"candidatures_echelle_locale\".\"état\" = ? THEN 1 ELSE 0.0 END) AS float) / CASE WHEN count(*) = 0 THEN NULL ELSE count(*) END) AS \"candidatures acceptée\" FROM \"public\".\"candidatures_echelle_locale\" WHERE (\"public\".\"candidatures_echelle_locale\".\"injection_ai\" = 0 AND \"public\".\"candidatures_echelle_locale\".\"origine_détaillée\" = ? AND (\"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ? OR \"public\".\"candidatures_echelle_locale\".\"type_structure\" = ?) AND \"public\".\"candidatures_echelle_locale\".\"date_candidature\" >= date_trunc('year', (now() + (INTERVAL '-1 year'))) AND \"public\".\"candidatures_echelle_locale\".\"date_candidature\" < date_trunc('year', now()) AND \"public\".\"candidatures_echelle_locale\".\"dept_org\" = ?)",
:params ("Candidature acceptée" "Prescripteur habilité PE" "AI" "ACI" "EI" "EITI" "ETTI" "93 - Seine-Saint-Denis")},
:status :failed,
:class org.postgresql.util.PSQLException,
:stacktrace
["org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)"
"org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:181)"
"org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:133)"
"com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471)"
"--> driver.sql_jdbc.execute$fn__55148.invokeStatic(execute.clj:363)"
"driver.sql_jdbc.execute$fn__55148.invoke(execute.clj:361)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invokeStatic(execute.clj:376)"
"driver.sql_jdbc.execute$execute_statement_or_prepared_statement_BANG_.invoke(execute.clj:372)"
"driver.sql_jdbc.execute$execute_reducible_query$fn__55230.invoke(execute.clj:500)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:499)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:486)"
"driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:494)"
"driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:486)"
"driver.sql_jdbc$fn__85194.invokeStatic(sql_jdbc.clj:54)"
"driver.sql_jdbc$fn__85194.invoke(sql_jdbc.clj:52)"
"query_processor.context$executef.invokeStatic(context.clj:59)"
"query_processor.context$executef.invoke(context.clj:48)"
"query_processor.context.default$default_runf.invokeStatic(default.clj:67)"
"query_processor.context.default$default_runf.invoke(default.clj:65)"
"query_processor.context$runf.invokeStatic(context.clj:45)"
"query_processor.context$runf.invoke(context.clj:39)"
"query_processor.reducible$identity_qp.invokeStatic(reducible.clj:12)"
"query_processor.reducible$identity_qp.invoke(reducible.clj:9)"
"query_processor.middleware.cache$run_query_with_cache.invokeStatic(cache.clj:193)"
"query_processor.middleware.cache$run_query_with_cache.invoke(cache.clj:178)"
"query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___52607.invoke(cache.clj:219)"
"query_processor.middleware.permissions$check_query_permissions$fn__48131.invoke(permissions.clj:109)"
"query_processor.middleware.mbql_to_native$mbql__GT_native$fn__51552.invoke(mbql_to_native.clj:23)"
"query_processor$fn__54083$combined_post_process__54088$combined_post_process_STAR___54089.invoke(query_processor.clj:212)"
"query_processor$fn__54083$combined_pre_process__54084$combined_pre_process_STAR___54085.invoke(query_processor.clj:209)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52528$fn__52533.invoke(resolve_database_and_driver.clj:35)"
"driver$do_with_driver.invokeStatic(driver.clj:75)"
"driver$do_with_driver.invoke(driver.clj:71)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52528.invoke(resolve_database_and_driver.clj:34)"
"query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__48563.invoke(fetch_source_query.clj:346)"
"query_processor.middleware.store$initialize_store$fn__48751$fn__48752.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:44)"
"query_processor.store$do_with_store.invoke(store.clj:38)"
"query_processor.middleware.store$initialize_store$fn__48751.invoke(store.clj:10)"
"query_processor.middleware.normalize_query$normalize$fn__52800.invoke(normalize_query.clj:22)"
"query_processor.middleware.constraints$add_default_userland_constraints$fn__49833.invoke(constraints.clj:53)"
"query_processor.middleware.process_userland_query$process_userland_query$fn__52739.invoke(process_userland_query.clj:145)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__53111.invoke(catch_exceptions.clj:167)"
"query_processor.reducible$async_qp$qp_STAR___44972$thunk__44974.invoke(reducible.clj:100)"
"query_processor.reducible$async_qp$qp_STAR___44972$fn__44976.invoke(reducible.clj:105)"],
:card_id 1536,
:context :embedded-dashboard,
:error "ERROR: canceling statement due to user request",
:row_count 0,
:running_time 0,
:preprocessed
{:constraints {:max-results 10000, :max-results-bare-rows 2000},
:type :query,
:middleware {:js-int-to-string? true, :ignore-cached-results? false},
:user-parameters
[{:type :category,
:slug "prescripteur",
:id "6957b229",
:value "Prescripteur habilité PE",
:target [:dimension [:field 11952 nil]]}
{:type :date/relative,
:slug "filtre_temporel_(ann%C3%A9e%2Fmois%2Fsemaine)",
:id "14cf843c",
:value "past1years",
:target [:dimension [:field 11954 nil]]}
{:type :string/=,
:slug "d%C3%A9partement",
:id "16a71fe5",
:value ["93 - Seine-Saint-Denis"],
:target [:dimension [:field 12670 nil]]}],
:info
{:context :embedded-dashboard, :card-id 1536, :card-name "[149] Taux de candidatures acceptées", :dashboard-id 149},
:database 2,
:query
{:source-table 792,
:filter
[:and
[:=
[:field 11961 nil]
[:value
0
{:base_type :type/Integer,
:effective_type :type/Integer,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "int4",
:name "injection_ai"}]]
[:=
[:field 11952 nil]
[:value
"Prescripteur habilité PE"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "origine_détaillée"}]]
[:or
[:=
[:field 12007 nil]
[:value
"AI"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "type_structure"}]]
[:=
[:field 12007 nil]
[:value
"ACI"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "type_structure"}]]
[:=
[:field 12007 nil]
[:value
"EI"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "type_structure"}]]
[:=
[:field 12007 nil]
[:value
"EITI"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "type_structure"}]]
[:=
[:field 12007 nil]
[:value
"ETTI"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "type_structure"}]]]
[:>= [:field 11954 {:temporal-unit :default}] [:relative-datetime -1 :year]]
[:< [:field 11954 {:temporal-unit :default}] [:relative-datetime 0 :year]]
[:=
[:field 12670 nil]
[:value
"93 - Seine-Saint-Denis"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/State,
:database_type "varchar",
:name "dept_org"}]]],
:aggregation
[[:aggregation-options
[:/
[:count-where
[:=
[:field 11955 nil]
[:value
"Candidature acceptée"
{:base_type :type/Text,
:effective_type :type/Text,
:coercion_strategy nil,
:semantic_type :type/Category,
:database_type "varchar",
:name "état"}]]]
[:count]]
{:name "candidatures acceptée", :display-name "candidatures acceptée"}]]},
:async? true,
:cache-ttl 1242},
:data {:rows [], :cols []}}