Variable table name in native queries

Metabase doesn’t support dynamic table names. There’s a lot of metadata attached to the table that Metabase has to keep track of.

MySQL 8 supports partitioned tables. Create a partitioned table and attach the month named tables as partitions. Then you can query the top level table to access the attached tables. There must be a key to identify the partition; in most cases like this you likely have a datetime column already that can serve as the key.

The partitions can be detached and dropped when no longer needed. Easy data lifecycle management.

The other way is to write a tool that uses the Metabase API to generate new questions every time a new table appears. We get lots of posts of people wanting to do this and not a lot of reports of success.