**Describe the bug**
I am using metabase for mac. My mongo db has 5 tables, I w…as able to connect it to 3, but 2 had errors **Distinct, non-empty sequence of Field clauses** I assume due to naming of the collection ( I was using underscores in 2 of them) and/or using dual keys. Not being very proficient with dbs, I uninstalled the software and installed again.
Now I have a single key in each collection and I don't use underscores in my names.
Now, I can read only one of the original collections and the other 4 show the same error.
`Distinct, non-empty sequence of Field clauses`
I tried running a forced sync+scan (Admin > Databases > (db) > Sync database schema now + Re-scan field values now), and the problem persists.
Any ideas what's wrong?
**Logs**
Please include javascript console and server logs around the time this bug occurred. For information about how to get these, consult our [bug troubleshooting guide](https://metabase.com/docs/latest/troubleshooting-guide/bugs.html)
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Severity**
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Metabase entirely?
Note: the more honest and specific you are here the more we will take you seriously.
**Additional context**
Add any other context about the problem here.
**Metabase Diagnostic Info**
```json
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko)",
"vendor": "Apple Computer, Inc."
},
"system-info": {
"java.runtime.name": "Java(TM) SE Runtime Environment",
"java.runtime.version": "1.8.0_202-b08",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_202",
"java.vm.name": "Java HotSpot(TM) 64-Bit Server VM",
"java.vm.version": "25.202-b08",
"os.name": "Mac OS X",
"os.version": "10.14.6",
"user.language": "en",
"user.timezone": "America/New_York"
},
"metabase-info": {
"databases": [
"h2",
"mongo"
],
"hosting-env": "osx",
"application-database": "h2",
"run-mode": "prod",
"version": {
"tag": "v0.33.7.1",
"date": "2019-12-13",
"branch": "release-0.33.x",
"hash": "d2dda64"
},
"settings": {
"report-timezone": null
}
}
}
```
Decided to use the java version...same problem. Below more detail about the problem:
```
12-24 19:14:01 WARN middleware.process-userland-query :: Query failure {:status :failed,
:class clojure.lang.ExceptionInfo,
:error "Distinct, non-empty sequence of Field clauses",
:stacktrace
("--> query_processor.middleware.add_implicit_clauses$fn__37199$sorted_implicit_fields_for_table__37204.invoke(add_implicit_clauses.clj:48)"
"query_processor.middleware.add_implicit_clauses$fn__37307$add_implicit_fields__37312$fn__37316.invoke(add_implicit_clauses.clj:93)"
"query_processor.middleware.add_implicit_clauses$fn__37307$add_implicit_fields__37312.invoke(add_implicit_clauses.clj:86)"
"query_processor.middleware.add_implicit_clauses$fn__37395$add_implicit_mbql_clauses__37400$fn__37404.invoke(add_implicit_clauses.clj:130)"
"query_processor.middleware.add_implicit_clauses$fn__37395$add_implicit_mbql_clauses__37400.invoke(add_implicit_clauses.clj:126)"
"query_processor.middleware.add_implicit_clauses$maybe_add_implicit_clauses.invokeStatic(add_implicit_clauses.clj:141)"
"query_processor.middleware.add_implicit_clauses$maybe_add_implicit_clauses.invoke(add_implicit_clauses.clj:137)"
"query_processor.middleware.add_source_metadata$add_source_metadata_for_source_queries$fn__37904.invoke(add_source_metadata.clj:107)"
"query_processor.middleware.resolve_source_table$resolve_source_tables$fn__42923.invoke(resolve_source_table.clj:46)"
"query_processor.middleware.add_row_count_and_status$add_row_count_and_status$fn__37741.invoke(add_row_count_and_status.clj:16)"
"driver.mongo$eval2008$fn__2009$fn__2011$f__702__auto____2013.invoke(mongo.clj:86)"
"driver.mongo.util$_with_mongo_connection$fn__693.invoke(util.clj:205)"
"util.ssh$with_ssh_tunnel_STAR_.invokeStatic(ssh.clj:106)"
"util.ssh$with_ssh_tunnel_STAR_.invoke(ssh.clj:91)"
"driver.mongo.util$_with_mongo_connection.invokeStatic(util.clj:199)"
"driver.mongo.util$_with_mongo_connection.invoke(util.clj:194)"
"driver.mongo$eval2008$fn__2009$fn__2011.invoke(mongo.clj:85)"
"query_processor.middleware.driver_specific$process_query_in_context$fn__40615.invoke(driver_specific.clj:12)"
"query_processor.middleware.resolve_driver$resolve_driver$fn__42537.invoke(resolve_driver.clj:22)"
"query_processor.middleware.store$initialize_store$fn__45667$fn__45668.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:46)"
"query_processor.store$do_with_store.invoke(store.clj:40)"
"query_processor.middleware.store$initialize_store$fn__45667.invoke(store.clj:10)"
"query_processor.middleware.async$async__GT_sync$fn__22968.invoke(async.clj:23)"
"query_processor.middleware.async_wait$runnable$fn__39657.invoke(async_wait.clj:89)"),
:query
{:type "query",
:query {:source-table 7},
:parameters [],
:async? true,
:middleware {:add-default-userland-constraints? true, :userland-query? true},
:info
{:executed-by 1,
:context :ad-hoc,
:card-id nil,
:nested? false,
:query-hash [59, 36, -9, 35, 39, -40, -16, -44, 89, -97, -75, 110, -55, 49, 86, -9, -88, -21, 4, -15, 4, 108, -84, 100, -51, -97, -97, 107, -12, -46, -114, 39]},
:constraints {:max-results 10000, :max-results-bare-rows 2000}},
:preprocessed nil,
:native nil,
:ex-data {:type :schema.core/error, :value (), :error (named (not ("Non-empty" a-clojure.lang.LazySeq)) "Distinct, non-empty sequence of Field clauses")}}
```