Table '...' has no Fields associated with it

#1

Hi -
I have 2 deployments one on v0.31.2 and one on v0.32.1.

In looking at the same datasource: Amazon Redshift going through the query builder 31.2 returns the data just fine, however on 32.1 I get the message on the screen that the table has no fields associated with it.

Any thoughts on where to troubleshoot next? If you goto straight SQL the data returns just fine.

I also see that there is a similar issue logged: https://github.com/metabase/metabase/issues/9428
Log Looks like this:

Apr 03 02:42:20 DEBUG metabase.middleware.log :: POST /api/dataset 200 (11 ms) (6 DB calls). Jetty threads: 8/50 (3 busy, 5 idle, 0 queued) (69 total active threads)
Apr 03 02:42:20 DEBUG metabase.async.api-response :: starting streaming response
Apr 03 02:42:20 WARN metabase.query-processor :: {:status :failed,
:class java.lang.Exception,
:error “Table ‘mjc_allproducts’ has no Fields associated with it.”,
:stacktrace
("–> query_processor.middleware.add_implicit_clauses$fn__31934$add_implicit_fields__31939$fn__31945.invoke(add_implicit_clauses.clj:81)"
“query_processor.middleware.add_implicit_clauses$fn__31934$add_implicit_fields__31939.invoke(add_implicit_clauses.clj:64)”
“query_processor.middleware.add_implicit_clauses$fn__32028$add_implicit_mbql_clauses__32033$fn__32039.invoke(add_implicit_clauses.clj:107)”
“query_processor.middleware.add_implicit_clauses$fn__32028$add_implicit_mbql_clauses__32033.invoke(add_implicit_clauses.clj:105)”
“query_processor.middleware.add_implicit_clauses$maybe_add_implicit_clauses.invokeStatic(add_implicit_clauses.clj:116)”
“query_processor.middleware.add_implicit_clauses$maybe_add_implicit_clauses.invoke(add_implicit_clauses.clj:114)”
“query_processor.middleware.add_row_count_and_status$add_row_count_and_status$fn__32071.invoke(add_row_count_and_status.clj:15)”
“query_processor.middleware.driver_specific$process_query_in_context$fn__33604.invoke(driver_specific.clj:12)”
“query_processor.middleware.resolve_driver$resolve_driver$fn__36375.invoke(resolve_driver.clj:15)”
“query_processor.middleware.bind_effective_timezone$bind_effective_timezone$fn__32800$fn__32801.invoke(bind_effective_timezone.clj:9)”
“util.date$call_with_effective_timezone.invokeStatic(date.clj:88)”
“util.date$call_with_effective_timezone.invoke(date.clj:77)”
“query_processor.middleware.bind_effective_timezone$bind_effective_timezone$fn__32800.invoke(bind_effective_timezone.clj:8)”
“query_processor.middleware.store$initialize_store$fn__39430$fn__39431.invoke(store.clj:11)”
“query_processor.store$do_with_new_store.invokeStatic(store.clj:35)”
“query_processor.store$do_with_new_store.invoke(store.clj:31)”
“query_processor.middleware.store$initialize_store$fn__39430.invoke(store.clj:10)”
“query_processor.middleware.cache$maybe_return_cached_results$fn__33222.invoke(cache.clj:127)”
“query_processor.middleware.catch_exceptions$catch_exceptions$fn__33270.invoke(catch_exceptions.clj:63)”
“query_processor$process_query.invokeStatic(query_processor.clj:232)”
“query_processor$process_query.invoke(query_processor.clj:228)”
“query_processor$run_and_save_query_BANG_.invokeStatic(query_processor.clj:341)”
“query_processor$run_and_save_query_BANG_.invoke(query_processor.clj:335)”
“query_processor$fn__39618$process_query_and_save_execution_BANG___39623$fn__39624.invoke(query_processor.clj:371)”
“query_processor$fn__39618$process_query_and_save_execution_BANG___39623.invoke(query_processor.clj:357)”
“query_processor$fn__39644$process_query_and_save_with_max_BANG___39649$fn__39650.invoke(query_processor.clj:403)”
“query_processor$fn__39644$process_query_and_save_with_max_BANG___39649.invoke(query_processor.clj:398)”
“async.semaphore_channel$do_f_with_permit$f__40020.invoke(semaphore_channel.clj:81)”
“async.util$do_on_separate_thread$fn__39855.invoke(util.clj:53)”),
:query
{:type “query”,
:query {:source-table 936},
:parameters [],
:constraints {:max-results 10000, :max-results-bare-rows 2000},
:info
{:executed-by 1,
:context :ad-hoc,
:card-id nil,
:nested? false,
:query-hash [58, -99, -97, 113, 18, 52, -110, -101, -108, 123, 68, -82, -32, -36, 65, 40, 86, 74, 55, 7, -113, 8, -93, -109, 9, 106, -39, -92, 32, -82, 4, 34],
:query-type “MBQL”}},
:preprocessed nil,
:native nil}

Apr 03 02:42:20 WARN metabase.query-processor :: Query failure

#2

Hi @adamb1

I don’t have a solution for you, but doing a search finds a handful of issues that more or less is related to each other.
https://github.com/metabase/metabase/issues?utf8=✓&q=is%3Aissue+“has+no+Fields+associated+with+it”
They all seem to indicate that it’s something to do with Views - most of the comments seems to note that.

If you can find a way to reproduce the issue, then it would probably be very useful for the developers.

Otherwise you might consider downgrading to 0.31.2 - and of course click the :+1: on the issues you want to upvote and click the Subscribe to signup for notifications.

#3

Hi @flamber - thank you for the feedback.

Could you point me in the direction of how to downgrade on docker or even pick a different version of metabase while building the docker container?

Sorry for the hassle, I’m new to this tool.

#4

@adamb1
No worries. Metabase is a big tool, so some things takes a little time to understand.
To run a specific version of a Docker image, you would start it with something like this:

docker run -d -p 3000:3000 --name metabase:v0.31.2 metabase/metabase:v0.31.2

To build your own version, you would need to get the branch, when doing Git:

git clone --branch release-0.31.2 https://github.com/metabase/metabase.git
#5

@flamber
Thank you so much for your help and patience with me!