I would like to be able to refer to tables with a certain naming schema to make my code uniform, but I am pulling tables from different environments with different naming schema. If I want all my tables to have names like example_table_1
and example_table_2
, but the second one is something like TB_ex_2
, is there a way to give that table an attribute so that I can also call select * from database.example_table_2
, and it will know to refer to TB_ex_2
?
I understand that I can alias tables, e.g. select * from TB_ex_2 example_table_2
, but I am trying to avoid that. Renaming each table is also not an option, because those names need to be retained to identify which environment they are coming from.