Hi,
I am creating a model from a MongoDB. It works well if I run the query manually. However, after saving the model, if I look at it in my collection I get an error: "There was a problem with your question"
Input to trim-sql-query does not match schema: e[0;33m [nil (named (not (instance? java.lang.String a-clojure.lang.PersistentArrayMap)) query-str)] e[0m
If I save it as a "question" (not a model) then I can not re-use this question in a following query and it returns the same error.
It seems caused by a "bad input value" but I am not sure how to debug/fix that.
Thanks,
My query:
[
{
"$project":{
"_id":"$_id",
}
}
]
Logs
"async.streaming_response$do_f_async$task__36922.invoke(streaming_response.clj:88)"],
:card_id 101,
:context :ad-hoc,
:error
"Input to trim-sql-query does not match schema: \n\n\t [nil (named (not (instance? java.lang.String a-clojure.lang.PersistentArrayMap)) query-str)] \n\n",
:row_count 0,
:running_time 0,
:preprocessed nil,
:ex-data
{:type :schema.core/error,
:value
[101
{:collection "task",
:query "[\n {\n \"$project\":{\n \"_id\":\"$_id\",\n }\n },\n { $limit: 10 }\n]"}],
:error [nil (named (not (instance? java.lang.String a-clojure.lang.PersistentArrayMap)) query-str)]},
:data {:rows [], :cols []}}