Change the database for a specific question

Is it possible to change the database for an existing question?

We have similar schemas in two databases : “production-db” and “dev-db” have mostly the same tables.
We frequently need to repeat an existing “dev” table question on the corresponding “production” database table.

For SQL queries this is easy, just copy the query. For Metabase questions, I have to rewrite all parameters.

2 Likes

Short answer: No currently not.

But as a workaround you might convert your Question to native SQL and manipulate the database on those as you describe you already do with other native Questions.

Related GitHub issues:

1 Like

It’s been 2 years, does anybody know whether now it’s possible to change the database for an existing question?

1 Like

Only if you want to change the connection for all questions that use that database.
For an individual questin, sadly not. The database is easy as it’s just an ID. The problem is all the tables in the question also have a unique id, as do the columns. It’s poor design in the backend database.

1 Like

Thanks for replying!

@AndrewMBaines So if I have all my questions having DB1 as a source, can I add a new DB (DB2) that has all the same schemas’, tables’, columns’ names as DB1 and then make all questions have DB2 as a source (and then delete DB1)?
If yes, how exactly?

No, change DB1 connection to be the settings you’d have for DB2

1 Like