Use the Workspace Copy Toolbox

Use the open-source command-line toolbox to copy objects between workspaces or client spaces.

3 min read

Duplicating information from one workspace to another is not possible in DataGalaxy. To do it, you must either export and import CSV files, or use the API.

To help our clients carry out this action, we developed an open-source tool available to everyone: github.com/datagalaxy-lab/datagalaxy-toolbox. This page helps you use it without specific coding knowledge. If you have the skills, feel free to help us improve this tool.

As an open-source tool, it is not part of the DataGalaxy platform and commercial offer. We therefore can't provide support on it. Don't hesitate to participate and help bring the missing features you need to this tool.

What do you need before you start?

The tool comes as a .exe file. There is nothing to install, but you must have execution rights for this type of file. There is no graphical interface: everything runs through command lines.

  • Access to the command prompt. Search for cmd or powershell in the Windows menu, or press Windows+R, then type cmd or powershell.
  • The ability to run the .exe file. Specific rights may be required.

What can the tool not copy?

The limitations are those related to the API. It is therefore not possible to copy:

  • synonyms
  • rich text formatting
  • images
  • diagrams
  • "golden" links

How to build the command line

A command line consists of several parts: the executable being called, the feature being called, the parameters (which vary depending on the feature), and the value of each parameter.

A complete command that copies a glossary from one workspace to another:

.\datagalaxy-toolbox.exe copy-glossary --url-source %url-source% --token-source %token_source% --workspace-source %workspace-source% --workspace-target %workspace-target%
  1. Collect --url-source, the API URL of your environment. Open your profile menu in the top right of the page and click DataGalaxy API: the API URL is shown in the window that opens.
  1. Collect --token-source, a personal access token or a generic (administrator) token. See Generate Tokens to Communicate with the API.
  1. Collect --workspace-source and --workspace-target, the names of the source and target workspaces. Both are in the Workspace Name field under Settings > Details.
  1. Assemble the command: start with .\datagalaxy-toolbox.exe, add the feature copy-glossary, then add each parameter followed by its value in quotes.

The same command once its first parameter is added:

.\datagalaxy-toolbox.exe copy-glossary --url-source "https://sandbox-tfr.demo.api.datagalaxy.com/v2"

How to run the command line

  1. Open cmd or PowerShell.
  1. Navigate to the executable's directory.
  1. Run the command. A summary of the objects found, created and modified is displayed.

Which features are available?

The complete list is on GitHub. This extract is subject to change.

Between 2 client spaces:

  • Delete / copy custom attributes
  • Copy technologies

Between 2 workspaces:

  • Copy screens
  • Delete / copy glossary objects
  • Delete / copy dictionary objects
  • Delete / copy processing objects
  • Delete / copy usage objects
  • Copy relationships between objects
Copy all modules first, then the relationships.

How to chain several commands

You can chain commands in a .bat file.

A .bat file that copies each module and then the links:

call .\datagalaxy-toolbox.exe copy-glossary --url-source %url-source% --url-target %url-target% --token-source %token_source% --token-target %token_target% --workspace-source %workspace-source% --workspace-target %workspace-target%
call .\datagalaxy-toolbox.exe copy-dictionary ...
call .\datagalaxy-toolbox.exe copy-dataprocessings ...
call .\datagalaxy-toolbox.exe copy-usages ...
call .\datagalaxy-toolbox.exe copy-links ...
pause

Read more

Related articles

Was this page helpful?