When building out any logical process, it is common to imagine reusability of components that you have built. Whether that is making a copy for yourself to take in a different direction, building out a template, or taking a subset of functionality and modularizing it, it can all lead to the design principle of Don’t Repeat Yourself, or DRY.
Did you know that Composable DataFlows can be shared and reused, even on another instance?
Initially, our DataFlow looks something like this (you may or may not have added comments here):
Now, if we wanted to share this with a colleague, there are a number of different options, depending on the use case. In our example, we will need to share an existing DataFlow with colleagues who are using a different instance of Composable (you).
With our DataFlow open in Designer view, we can look to the Designer Toolbar at the top of the canvas and click Export in the middle of the bar.
That creates and downloads a JSON file that contains all of the information defined in the DataFlow. The default name is the name of the DataFlow, as seen (and managed in) Manage DataFlow > Details, to the right of the Designer canvas.
You could now share this file with a colleague, enter it into an external version control system (although Composable has robust version control), or store it locally.
To import an exported DataFlow JSON file, simply create a new DataFlow and return to the toolbar above the canvas. Click Import.
Choose the JSON File. I will pick the one that we just exported.
After completing the file selection, the Import DataFlow window confirms that a file has been chosen and activates the Confirm button. Note that you do have the option to overwrite whatever DataFlow you are in, but I usually start from a clean canvas, so that I wouldn’t need to.
Select Confirm and that’s it.
Now our canvas is filled with a new copy of our old DataFlow, including comments, Name, Description, even the position of modules on the canvas and different Wire Type.
It’s just that easy.