Variables all not required


I have to give input for all the three variables then it works, how to make it work when only one input is given?

Hi @ishkabirk
Please read the entire documentation, but specifically Optional Clauses: https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#optional-clauses

Any Idea?

@ishkabirk

  1. Post "Diagnostic Info" from Admin > Troubleshooting.
  2. Post the full stacktrace error from Admin > Troubleshooting > Logs.
  3. Post your query.

{
"browser-info": {
"language": "en-GB",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.13+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.13",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.13+8",
"os.name": "Linux",
"os.version": "5.4.156-83.273.amzn2.x86_64",
"user.language": "en",
"user.timezone": "Asia/Kolkata"
},
"metabase-info": {
"databases": [
"postgres",
"h2",
"mysql",
"mongo",
"redshift",
"presto"
],
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MySQL",
"version": "8.0.23"
},
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.6.2"
}
},
"run-mode": "prod",
"version": {
"date": "2021-12-16",
"tag": "v0.41.5",
"branch": "release-x.41.x",
"hash": "fbfffc6"
},
"settings": {
"report-timezone": "UTC"
}
}
}

The logs are not updated time right now is 3pm + , the log time is still in 2:50 pm

@ishkabirk The logs shows exactly what is going on - otherwise your server time is incorrect. Fix that.
Latest release is 0.42.4: https://github.com/metabase/metabase/releases/latest

new error,

@ishkabirk

  1. Always post error messages in clear text. Search the forum for that error and the internet.
  2. Since you got something working, then describe what the problem was and how you got it working.

I was following this thread,
When query contains double bracket `]]`, then it is read as a Optional Clause and querying fails · Issue #11755 · metabase/metabase · GitHub, After which i got this error,
How to correct it

@ishkabirk Do exactly what I write:

  1. Post your query here
  2. Post a screenshot of the entire window, which shows your query and the variable sidebar
  3. Stop posting screenshots of errors. Post the text - copy-paste.

This is the whole screen in the match column when I put '[[' before $ match the following error is observed, but when I remove it , it is working, Any Idea on how to correct this issue, Since I want it to be optional variable

@ishkabirk Try reading this Optional date clause in mongo db query - otherwise create a View on your database. I cannot help you anymore.