changeDatasourcePlugin plugin release 2.0

The plugin has received several main improvements and minor changes:


  1. Data sources browsing
  2. Bad Layers Handling
  3. Expression driven data sources replace

Data source browsing


New data source selection can now be performed by a Qgis browser widget between those currently available.  Clicking on browse button in the contextual windows or in in the datasources tables now appears Qgis browser instance where can be specified the new datasource to apply.

Bad Layers Handling

This feature has been developed thanks to Baswein suggestions who contributed with a precious and accurate plugin testing during development.

The plugin can handle bad layers replacing the standard bad layer manager with the datasources table. The new feature has been developed thanks to The standard bad layer manager allows to fix only at the opening of the project.


If not reconciled at the opening of the project, bad layers and their related settings (for example symbologies, labels, joins …) are definitively lost. Furthermore datasources browsing is allowed only for file datasources (OGR and GDAL). For other datasources the only way is to manually modify connection string.

The new feature allows to specify bad layers with missing datasources later, during qgis project session, specifying them with the same plugin methods.

The bad layers handling have to be activated checking “Handle bad layers” checkbox located at the bottom of the main plugin dialog, and restarting QGis.cds2.png

Once activated the improved Bad Layers Handling, if missing datasources are detected the following dialog appears after loading the project.cds4
The dialog notifies that the bad layers are now handled by changeDatasource plugin.

The bad layers awaiting to be reconciled are keeped with all their properties and settings under the “unhandled layers” group located at the bottom of legend tree.

Bad layers are reconciled specifying a new valid and compatible datasource with the contextual dialog or by the datasources table. Unhandled layers are marked with light brown backgroundcds5
If successfully reconciled the layers are moved from the “unhandled layers” group to their original legend position, preserving in this way the right project draw order.

Expression driven data sources table replacing

The datasource table dialog allows a new method for massive change of layers datasources using expressions. The well known widget can be used to rewrite the datasources using layers properties (filename, data type, provider, geometry type ….) as fields:


Download the plugin



  1. Pingback: QGIS changeDatasourcePlugin plugin release 2.0 –
  2. Rob Willson

    so painful to use QGIS 3 without change datasource and picklayer plugins. I guess that’s what happens when you become used to the functions made available with those plugins and use them everyday. Have you been able to make any progress on porting them to Q3?

  3. Andrea

    Hi Enrico,
    I’m not sure this is the right place. I’ve just started using your plugin which is beautiful. The only thing I can’t workout is that sometimes I have unhandled layers which I would like to delete. I removed them from the workspace after having reconciled all the others, but they reappear when I open the workspace. Is there a way of getting rid of unhandled layers?


    • enricofertest

      Hi Andrea, I know the issue, I managed to solve it without success. In the meantime QGIS3 was released and I have to check if it can be more easily fixed migrating the plugin to new API.

  4. DPSSpatial (@dpsspatial)

    Would like to echo the usefulness of the changeDataSource plugin and rooting for an upgrade to QGIS 3… I also teach a PostGIS/QGIS workshop that utilizes this plugin, and would be nice to continue to teach students how this tool is almost essential for using spatial database tables with QGIS. Thank you for all your work!

  5. Jorge Almerio

    Hi Andrea, congratulations for the changeDataSource plugin. I am also one of the many users waiting for plugin porting to Qgis 3.

  6. Amelie

    Hello Enrico, do you have any idea when you would be able to work on this Changedatasource plugin? I also find this such an essential function! Many thanks for your work towards thousands of users! Amelie

    • enricofertest

      I have a family and a job to carry out. I work in open source in my spare time and I want to be free to occupy my time for whatever is interested or funny for me.
      If you need the plugin for QGIS3 take the code on repository and modify by your self.
      If you follow plugin discussions instead of complain you could discover that other users, much more useful for QGIS community than you, are trying to migrate the plugin.
      Other users, that think that other people time is precious and valuable, are willing to finance a PR to include plugin functions in QGIS core.

      • siqer

        So, I said the same, if you are not going to migrate the plugin YOU SHOULD make it clear, and others will do! Our time is also precious and valuable to do not wait you eternally.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s