Filters are bugged after renaming table

Version : 0.38.0.1
OS MAC Catalina 10.15.7 (19H1217)
Browser : Chrome 93.0.4577.82 (Official Build) (x86_64)

We recently changed our schema for a table. We renamed the old table and created a new table with the same name so that all our queries still point to the same place. All of the columns the filters relate to have the same name but when used some of the filters return no results and are using old cached predictive values that no longer exist on the new table but were from the previous old table. Our DB is Redshift for this specific bug.

{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.8+10-post-Ubuntu-0ubuntu118.04.1",
"java.vendor": "Ubuntu",
"java.vendor.url": "https://ubuntu.com/",
"java.version": "11.0.8",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.8+10-post-Ubuntu-0ubuntu118.04.1",
"os.name": "Linux",
"os.version": "5.3.0-1035-aws",
"user.language": "en",
"user.timezone": "Etc/UTC"
},
"metabase-info": {
"databases": [
"redshift",
"mysql"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"date": "2021-02-19",
"tag": "v0.38.0.1",
"branch": "release-x.38.x",
"hash": "0635914"
},
"settings": {
"report-timezone": "UTC"
}
}
}

Hi @mariustalpos
Filter values are only scanned once every day by default, but initiate a re-scan manually:
https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#choose-when-metabase-syncs-and-scans

I would strongly suggest that you upgrade immediately to a newer release:
https://github.com/metabase/metabase/releases/latest
And also migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

Hi @flamber Thanks for replying. We've had this problem for a few days now but I will check out schedule for scans. Is there a list of possible updates we might have to make to our dashboards when we upgrade anywhere?

@mariustalpos You are using an vulnerable version of Metabase: https://github.com/metabase/metabase/security/advisories/GHSA-vmm4-cwrm-38rj

There has been many changes since 0.38.0, but upgrading is an automated process, so you don't need to do anything. Just make sure you have backups.
See list of major changes in
https://www.metabase.com/blog/Metabase-0.39/index.html
https://www.metabase.com/blog/Metabase-0.40/index.html
https://www.metabase.com/blog/Metabase-0.41/index.html

Ok thanks. It seems updating also solved a few other issues I had with filters but im not able to select any other options other than Day when Summarizing by date as there is no sub menu and the new UI on the Visualization tab has no selectable options

@mariustalpos
Post "Diagnostic Info" from Admin > Troubleshooting.
You might need to refresh your browser, perhaps it's caching something.
Post a screenshot of the problem.

{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 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-Ubuntu-0ubuntu1.18.04",
"java.vendor": "Ubuntu",
"java.vendor.url": "https://ubuntu.com/",
"java.version": "11.0.13",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.13+8-Ubuntu-0ubuntu1.18.04",
"os.name": "Linux",
"os.version": "5.3.0-1035-aws",
"user.language": "en",
"user.timezone": "Etc/UTC"
},
"metabase-info": {
"databases": [
"redshift",
"mysql"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"date": "2022-01-10",
"tag": "v0.41.6",
"branch": "release-x.41.x",
"hash": "296635f"
},
"settings": {
"report-timezone": "UTC"
}
}
}


At the bottom I just get a blank drop down


And here I no longer have the little arrow that opens a submenu

@mariustalpos
Go to Admin > Data Model > (db) > (table) > Date New :gear: > then the URL ends with .../123/general, where 123 is the field ID, then go to the URL /api/field/123 and post the output here.

{
"description": null,
"database_type": "varchar",
"semantic_type": "type/CreationDate",
"table_id": 196,
"coercion_strategy": null,
"table": {
"description": null,
"entity_type": "entity/GenericTable",
"schema": "public",
"db": {
"description": null,
"features": [
"full-join",
"basic-aggregations",
"standard-deviation-aggregations",
"expression-aggregations",
"percentile-aggregations",
"foreign-keys",
"right-join",
"left-join",
"native-parameters",
"nested-queries",
"expressions",
"set-timezone",
"regex",
"case-sensitivity-string-filter-options",
"binning",
"inner-join",
"advanced-math-expressions"
],
"cache_field_values_schedule": "0 0 12 * * ? *",
"timezone": "UTC",
"auto_run_queries": true,
"metadata_sync_schedule": "0 22 * * * ? *",
"name": "client_aic",
"caveats": null,
"is_full_sync": true,
"updated_at": "2021-12-17T20:19:08.076",
"cache_ttl": null,
"details": {
"host": "data-warehousing.redshift.starmarkcloud.com",
"port": 5439,
"db": "client_aic",
"user": "smiadmin",
"password": "MetabasePass",
"tunnel-enabled": false
},
"is_sample": false,
"id": 36,
"is_on_demand": false,
"options": null,
"engine": "redshift",
"refingerprint": null,
"created_at": "2020-08-24T13:05:32.072",
"points_of_interest": null
},
"show_in_getting_started": false,
"name": "aic_delivery_all_media",
"caveats": null,
"updated_at": "2021-08-09T16:26:11.699",
"entity_name": null,
"active": true,
"id": 196,
"db_id": 36,
"visibility_type": null,
"field_order": "alphabetical",
"display_name": "Aic Delivery All Media",
"created_at": "2020-08-26T14:38:37.812",
"points_of_interest": null
},
"name": "date_new",
"fingerprint_version": 5,
"has_field_values": "list",
"settings": null,
"caveats": null,
"fk_target_field_id": null,
"dimensions": [],
"updated_at": "2022-01-24T15:08:40.229",
"custom_position": 0,
"effective_type": "type/Text",
"active": true,
"parent_id": null,
"id": 2864,
"last_analyzed": "2022-01-18T15:22:23.777",
"position": 11,
"visibility_type": "normal",
"preview_display": true,
"display_name": "Date New",
"database_position": 6,
"name_field": null,
"fingerprint": {
"global": {
"distinct-count": 74,
"nil%": 0.0
},
"type": {
"type/Text": {
"percent-json": 0.0,
"percent-url": 0.0,
"percent-email": 0.0,
"percent-state": 0.0,
"average-length": 3.031
}
}
},
"created_at": "2020-08-27T16:00:22.727",
"base_type": "type/Text",
"points_of_interest": null
}

@mariustalpos It's a string, not a real timestamp. You need to cast it: https://www.metabase.com/docs/latest/administration-guide/03-metadata-editing.html#casting-to-a-specific-data-type

Works like magic now. Thanks!