Is there a way to change Views base table dynamically? I have a couple of Search API indexes for different server environments (test, qa, uat, prod) with different configurations.

Instead of create 4 views in the admin, I just want to use one, and depending on environment, swap the base table (index). That way I can have one view at one URL.

Is that possible in Drupal 8?
Just use configs overrides services like described here https://www.drupal.org/docs/8/api/configuration-api/configuration-override-system

Example:

if (in_array('views.view.config.name', $names)) {
  $overrides['views.view.config.name'] = ['base_table' =&gt; 'your_base_table'];
}