Question not returning results for SPECIFIC period


#1

Hi guys!
Well, this one got me really scared. Check this out:

And, then:

There is no trick on the SQL - when run directly on the database, both questions return rows, and they should (table only contained data until October 21st). I had cache turned on, turned it off, and nothing changed. Any clue on what might this be?

If I change the period to any other data ending in Octoer 21st, I get no results. If it ends later, it returns the results normally. I restarted metabase instance, nothing changed. Nothing special on the logs, either.


#2

I’ve tried literally anything I could think of, no results, no matter what I try. I really need support on this - if this is to ever happen, how am I supposed to trust metabase, and I have been doing, to present data to my users?

If I simply replace the parameters placeholders for a string, it runs normally. It is totally on metabase’s end. Looking at the log, absolutely nothing even pops. It is like metabase is not even trying to run the question. no matter what I do.

I’m running a 0.29 instance on an EC2 machine. But I’ve tried the same query and foundd the same behaviour in a local instance of metabase 0.30.3. This is definitely a bug, I dare to say, but I have no clue about what type of bug.

I also did start metabase, and, imediatly run this query. This is what I saw in the log:

:template_tags                                                                                                                                                                                                                                
  {:data_inicio {:id "9e6055f3-73a1-8023-ecab-06c3ffad4a8a", :name "data_inicio", :display_name "Data inicio", :type "date", :required true},                                                                                                   
   :data_fim {:id "d7a5d43b-45c1-5418-106a-7f99dd957e42", :name "data_fim", :display_name "Data fim", :type "date", :required true}}},                                                                                                          
 :constraints {:max-results 10000, :max-results-bare-rows 2000},                                                                                                                                                                                
 :parameters [],                                                                                                                                                                                                                                
 :cache_ttl nil,                                                                                                                                                                                                                                
 :info                                                                                                                                                                                                                                          
 {:executed-by 2,                                                                                                                                                                                                                               
  :context :question,                                                                                                                                                                                                                           
  :card-id 524,                                                                                                                                                                                                                                 
  :dashboard-id nil,                                                                                                                                                                                                                            
  :query-hash [-77, 1, -5, 101, -56, 87, 41, 126, 109, 100, 127, -40, 95, 51, 103, -118, -102, -33, 24, 86, 43, 53, 43, -93, -93, 15, -20, -22, -121, -105, 112, 17],                                                                           
  :query-type "native"}},                                                                                                                                                                                                                       
:expanded-query nil}                                                                                                                                                                                                                            
[[0m                                                                                                                                                                                                                                            
0-22 17:44:20 ^[[1mWARN metabase.query-processor^[[0m :: ^[[31mQuery failure: 'Data inicio' is a required param.                                                                                                                                
"query_processor$assert_query_status_successful.invokeStatic(query_processor.clj:211)"                                                                                                                                                          
"query_processor$assert_query_status_successful.invoke(query_processor.clj:204)"                                                                                                                                                                
"query_processor$run_and_save_query_BANG_.invokeStatic(query_processor.clj:244)"                                                                                                                                                                
"query_processor$run_and_save_query_BANG_.invoke(query_processor.clj:237)"                                                                                                                                                                      
"query_processor$fn__31502$process_query_and_save_execution_BANG___31507$fn__31508.invoke(query_processor.clj:283)"                                                                                                                             
"query_processor$fn__31502$process_query_and_save_execution_BANG___31507.invoke(query_processor.clj:269)"                                                                                                                                       
"api.card$run_query_for_card.invokeStatic(card.clj:608)"                                                                                                                                                                                        
"api.card$run_query_for_card.doInvoke(card.clj:594)"                                                                                                                                                                                            
"api.card$fn__41057$fn__41060$fn__41061.invoke(card.clj:615)"                                                                                                                                                                                   
"api.card$fn__41057$fn__41060.invoke(card.clj:614)"                                                                                                                                                                                             
"api.common.internal$do_with_caught_api_exceptions.invokeStatic(internal.clj:254)"                                                                                                                                                              
"api.common.internal$do_with_caught_api_exceptions.invoke(internal.clj:249)"                                                                                                                                                                    
"api.card$fn__41057.invokeStatic(card.clj:610)"                                                                                                                                                                                                 
"api.card$fn__41057.invoke(card.clj:610)"                                                                                                                                                                                                       
"middleware$enforce_authentication$fn__38506.invoke(middleware.clj:118)"                                                                                                                                                                        
"api.routes$fn__49374.invokeStatic(routes.clj:64)"                                                                                                                                                                                              
"api.routes$fn__49374.invoke(routes.clj:64)"                                                                                                                                                                                                    
"routes$fn__49469$fn__49470.doInvoke(routes.clj:108)"                                                                                                                                                                                           
"routes$fn__49469.invokeStatic(routes.clj:103)"                                                                                                                                                                                                 
"routes$fn__49469.invoke(routes.clj:103)"                                                                                                                                                                                                       
"middleware$log_api_call$fn__38605$fn__38607.invoke(middleware.clj:349)"                                                                                                                                                                        
"middleware$log_api_call$fn__38605.invoke(middleware.clj:348)"                                                                                                                                                                                  
"middleware$add_security_headers$fn__38555.invoke(middleware.clj:251)"                                                                                                                                                                          
"core$wrap_streamed_json_response$fn__54821.invoke(core.clj:67)"                                                                                                                                                                                
"middleware$bind_current_user$fn__38510.invoke(middleware.clj:139)"                                                                                                                                                                             
"middleware$maybe_set_site_url$fn__38559.invoke(middleware.clj:275)"]

I can’t, for the life in me, figure out what is happening - only I know it seriously makes me think about reliability here…


#3

Hey, Lucas. Sorry you’re having trouble. Could we see the SQL for your query, as well as your variables’ settings in the side panel? And could you remind me what type of database it is that you’re querying against? One last thing that might be helpful to know is what your Report Timezone setting is set to in /admin/settings/general. Thanks!


#4

Oh, gosh, I talked about everything and forgot to mention I was querying against a MySQL 5.6 instance. I’m not using any particular timezone, I’m leaving it for the Default (no option selected).

Regarding to the variables, here are they:

Hm… Now you mentioned timestamp, let me add more info on this: Brazil had a daylight saving time scheduled to start last week, but our government did change it, delaying it a week or so. And it should have started exactly at July 21st. It happens that my EC2 server did not delay it, so it is an hour ahead - but the database itself works at GMT 00:00. Things are a bit messed up, even cellphones in Brazil lost their stuff and got the wrong hour.

I think that is the cause. But, how? Why? I mean, what is happening?

If you still think it necessary, I might provide SQL, but it seems not to be the case anymore.


#5

As a first step, have you taken a look at this timezones troubleshooting guide? https://metabase.com/docs/v0.30.4/troubleshooting-guide/timezones.html


"Must be an OrderableValue or OrderableValuePlaceholder" error
#6

Yes, Maz. I have. No good so far. Looking at raw data, all my time and hour fields are being displayed correctly. It happens to, and only to, the 21st July - it is somehow a cursed day. In the troubleshooting, the thing is incorrect numbers. But, in my case, it is more like “data is there, but can’t br retrived by metabase”. As I said, if I query data from, say, ‘2018-10-15’ -> ‘2018-10-22’, I can get it; if, however, I query for ‘2018-10-15’ -> ‘2018-10-21,’ no data is retrived at all. I don’t really get it.