Copy connections from one environment to another

Microsoft Cloud for Sustainability icon. Microsoft Cloud for Sustainability

You can copy your data import connections in Microsoft Sustainability Manager from one environment to another. For example, you can copy connections from your test environment to your production environment. This ability helps ensure that you can maintain verifiable processes across your environments.

You might need this ability in scenarios where:

  • Different personas are responsible for different operational processes​
  • You develop, test, and validate in a preproduction environment​ such as dev or test
  • You need to transfer a connection to an upgraded environment​
  • You need to transfer a connection to another region, perhaps with source modification​
  • You want to replicate a connection for different sources that have the same data shape​
  • You need to troubleshoot connection issues in a nonproduction environment​ for a GA deployment

This article shows you how to use Power Platform application lifecycle management (ALM) to transfer connections across environments.

Prerequisites

Process

A connection in Sustainability Manager consists of the following parts:

  • Data source connectivity specifications
  • Mode of import, such as Power Query, Excel, or from a custom data provider
  • Mapping of source data to the Microsoft Cloud for Sustainability data model
  • Context of the import, such as scheduling

The following steps show the overall process for copying a connection:

  1. In the Power Apps portal for the environment that contains the connection you want to copy, create a new solution.
  2. Add the connection and connection map. The connection map is optional, but highly recommended because it contains the data mappings for the connection.
  3. Publish the customizations.
  4. Export the solution as an unmanaged solution.
  5. Download the solution.
  6. In the environment you want to copy the connection to, import the solution in the Power Apps portal.
  7. In Sustainability Manager, edit the import and make any necessary changes. For example, you might need to configure credentials or the data flow.

Example

This example provides a detailed walkthrough for copying a connection from one environment to another.

  1. Sign into the Power Apps portal as a system admin and select the environment you want to copy the connection from.

  2. Select Solutions on the navigation pane, and then select New solution on the menu bar.

  3. In the New solution pane, enter a Display name. In the Publisher field, select CDS Default Publisher. Select Create.

  4. On the solution page, select Add existing on the menu bar. On the dropdown, select More, select Other, and then select Connection. Select the connection you want to copy, and then select Add.

    Screenshot showing how to copy the connection.

  5. Again, select Add existing on the menu bar. On the dropdown, select More, select Other, and then select Sustainability data connection map. Select the associated maps for the connection, and then select Add.

    The display names of the sustainability data connection maps are a concatenation of the connection name plus the query name. For example, you might have a connection called My connection and two queries called Sheet1 and Sheet2. In this case, the map names appear as My Connection-Sheet1 and My Connection-Sheet2.

    Screenshot showing how to copy the connection map.

  6. Select Publish all customizations.

  7. On the Solutions page, select your solution, and then select Export solution.

  8. On the Export this solution pane, under Export as, select Unmanaged.

    Screenshot showing how to export the solution as unmanaged.

  9. Select Download.

    Screenshot showing how to download the solution.

  10. In the Power Apps portal for the environment you want to copy the solution to, and select Import solution.

  11. On the Import a solution pane, select Browse, select the exported solution, and then select Import. When the import succeeds, a notification appears at the top.

  12. In Sustainability Manager in the same environment, select Imports in the navigation pane. On the Data imports tab, select Refresh.

    Note

    The import status shows the same as it is in the previous environment you exported from because everything is just copied over. You need to complete the next steps to set up the import in the current environment properly.

  13. Select the import, and then select Edit import.

    Screenshot showing how to edit the import.

  14. On the Define your data page, select Next. On the Manage data source page, select Configure connection. Edit your credentials if necessary, and then select Connect. On the Schedule data import page, select Next. On the Review and name page, select Connect.

  15. Select the Map fields button. The mappings that you imported appear. Set the Ready to import toggle to yes.

    Screenshot showing how to toggle the import as Ready to import.

The import is scheduled, and the new connection works the same as any other import you created in the current environment.

See also