Promoting a preparation across environments
The best practice when using Talend Cloud Data Preparation is to set up one instance for each environment of your production chain.
To promote a preparation from one environment to the other, you have to export it from the source environment, and then import it back to your target environment.
For the import to work, a dataset with the same name and schema as the one which the export was based on must exist on the target environment.
Let's take the example of a simple preparation, used to remove invalid values and formatting errors from an Excel file containing customers data. This preparation is saved as customers preparation.
The following procedure will detail how to export this simple preparation into a file that can be reimported to a new environment.
Exporting a preparation from the source environment
Procedure
Results
The preparation is exported as a .json file and the download automatically starts. Save it to your preferred location and rename it customers_preparation.json for example.
Importing a preparation to the target environment
Before you begin
A dataset with the same name and schema as the one which the export was based on must be present on the target environment.
The reason for this is that when a preparation is exported as a .json file, the name and schema of the source dataset are exported, in addition to the preparation steps that were applied. The target environment must contain this information on the source dataset, in other words a dataset with the same name and schema, or an error will occur during the import.
Procedure
Results
The customers preparation is added to the list of preparations in the Preparations view of the homepage. It can now be safely used as a production-ready item, in a Talend Job for example, to easily clean data with the same model.