Copy queries and dashboards between data source

I’m using hosted redash, I have multiple data sources (dev, sandbox and prod).

I want to develop the dashboard over on my dev connection and then copy it to the prod data source.
What’s the best way of doing it?

I found a script of export and import via the API?
Is this the best way to achieve this?

I would use the API with a Python script. You just need to update the data_source_id for the underlying queries. redash_toolbelt is quite helpful for this. Have you used Python before?

yes , many times
I saw it, but wanted to know if there is some feature baked into the product

Not that I’m aware of :man_shrugging:

I would write a script with a signature like change_ds_for_query(new_ds, query1, query2, query3 ...)

The script would then loop through each query, pull it’s details from the API and then POST them right back but with new_ds for the data_source_id.