Adding Filters for SQL Questions

Hello there!
We have a dashboard with views built using complex SQL questions. We want to add date filter to this dashboard. We are facing an issue doing the same.
Here is our approach so far - We found out that we need to create a variable from the existing database for adding a filter to Metabase Dashboard. And we are facing an issue while doing the same, that when we connect Metabase to Azure DWH, it returns only one column from the table and not all. But when we create a question by querying the same database it works fine.
Please let me know if you need any additional information.
Thanks much!

Hi @Gini
I don't think I understand the problem - can you describe it differently or possibly use screenshots to help show it.

Please post "Diagnostic Info" from Admin > Troubleshooting.

It would be helpful to see the query.

Have you read this article? https://www.metabase.com/learn/building-analytics/dashboards/filters.html

Hello team,

We tried connecting Azure Synpase SQL Pool, using Metabase as our data visualization tool. And when we connect Metabase to Azure SQL Synapse Pool, it returns only one column from the table and not all. But when we create a question by querying the same database it works fine.
And because of the same issue, we are not able to add field filters to the created question. Please find the screenshot attached regarding the mentioned issue.


@flamber Bharti is a part of our team and is going to take over this conversation and provide you with the details. Thank you!

@Bharti

  1. Post "Diagnostic Info" from Admin > Troubleshooting
  2. Do a manual Admin > Databases > (db) > "Sync database schema now", and then check the log for any errors - Admin > Troubleshooting > Logs.

@flamber Please find below the required information:
Diagnostic info :{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "1.8.0_282-b08",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "https://adoptopenjdk.net/",
"java.version": "1.8.0_282",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "25.282-b08",
"os.name": "Linux",
"os.version": "4.15.0-1113-azure",
"user.language": "en",
"user.timezone": "Etc/UTC"
},
"metabase-info": {
"databases": [
"h2",
"mysql",
"mongo",
"bigquery",
"sqlserver"
],
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MySQL",
"version": "5.6.47.0"
},
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.6.2"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.38.3",
"date": "2021-04-01",
"branch": "release-x.38.x",
"hash": "8332830"
},
"settings": {
"report-timezone": "Asia/Singapore"
}
}
}

Please find the error log attached:

@Bharti

  1. You need to upgrade the MySQL used for the application database - minimum is 5.7.7:
    https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html#mysql-or-mariadb
  2. There has been several fixes to the sync in later versions. Please try latest 0.39.4 - remember to backup before upgrading.
    https://github.com/metabase/metabase/releases/latest