Describe the bug
When you edit model metadata linking a field to a table column, it's the name of the table column that is used in queries (on filters for example)
To Reproduce
- Native > Sample >
select name, category as "category_name" from products
- Save question and turn it into Model as "M1"
- Edit Metadata and map the column
category_name
to Products.category
- Ask a question based on "M1" : Filter on column "category_name"
You will have this error
Troubleshooting
{
"browser-info": {
"language": "fr-FR",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.11+9",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "https://adoptopenjdk.net/",
"java.version": "11.0.11",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.11+9",
"os.name": "Linux",
"os.version": "4.19.0-13-cloud-amd64",
"user.language": "fr",
"user.timezone": "Europe/Paris"
},
"metabase-info": {
"databases": [
"postgres",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.6 (Debian 13.6-1.pgdg100+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.3.5"
}
},
"run-mode": "prod",
"version": {
"date": "2022-08-04",
"tag": "v1.44.0",
"branch": "release-x.44.x",
"hash": "d3700f5"
},
"settings": {
"report-timezone": null
}
}
}