0 / 0
Downloading and importing a DataStage flow and its dependencies

Downloading and importing a DataStage flow and its dependencies

You can download DataStage® flows and import them into another project, along with any dependencies that the flow has.

You can download individual or multiple DataStage flow and their dependencies in the form of a ZIP file, then import the file into another project. Dependencies of flows include items such as connections, subflows, or parameter sets.

You can also use command-line tools or the DataStage API to accomplish this task. For more information on using the command-line tools, see DataStage command-line tools.

Note: Downloaded flows might include connection assets that have credentials or other sensitive information. You can run the following command to change the export behavior so that all future exports remove credentials by default.

oc -n ${PROJECT_CPD_INSTANCE} patch datastage datastage --patch '{"spec":{"migration_export_remove_secrets":true}}' --type=merge

Downloading and importing an individual DataStage flow and its dependencies

To download an individual DataStage flow and its dependencies:
  1. In a DataStage flow, click the Download icon Download icon on the toolbar.
  2. Download and save the file to your computer. The downloaded file might include connection assets that have credentials or other sensitive information.
  3. In a different project, go to the Assets tab, then click New asset. The New asset page opens.
  4. Locate and click the DataStage tile. The Create a DataStage flow page opens.
  5. Click Local file, click Browse, then select the ZIP file from your computer. You can also drag the file from your computer onto the page. Then, click Create.
  6. Select one of the following actions from the drop-down menu for Asset conflicts:
    Skip
    This action is the default. If an asset or dependency with the same name already exists, the asset from the ZIP file is not imported. The import report indicates whether anything was skipped.
    Rename
    The name of the imported asset or dependency is appended with additional information to make the name different from the one that already exists.
    Replace
    The asset or dependency from the ZIP file overwrites any existing assets or dependencies with the same name.
  7. Select the ZIP file, then click Create.

You can also download an individual flow by using the method that is shown in Downloading and importing multiple DataStage flows and their dependencies and selecting a single flow to download.

Downloading and importing multiple DataStage flows and their dependencies

To download multiple DataStage flows and their dependencies:
  1. On the Assets tab of your project, under Asset types, click DataStage flows.
  2. Select the flows that you want to download from the list.
  3. Click Download. A dialog box opens that asks if you removed credentials from the assets. Click Cancel download to stop or Continue download to proceed.
  4. Download and save the file to your computer. The downloaded file might include connection assets that have credentials or other sensitive information.
  5. In a different project, go to the Assets tab, then click New asset. The New asset page opens.
  6. Locate and click the DataStage tile. The Create a DataStage flow page opens.
  7. Click Local file, click Browse, then select the ZIP file from your computer. You can also drag the file from your computer onto the page. Then, click Create.
  8. Select one of the following actions from the drop-down menu for Asset conflicts:
    Skip
    This action is the default. If an asset or dependency with the same name already exists, the asset from the ZIP file is not imported. The import report indicates whether anything was skipped.
    Rename
    The name of the imported asset or dependency is appended with additional information to make the name different from the one that already exists.
    Replace
    The asset or dependency from the ZIP file overwrites any existing assets or dependencies with the same name.
  9. Select the ZIP file, then click Create.

You can also download an individual flow by using this method and selecting a single flow to download.

Asset conflict options

When you import DataStage .zip files that contain connections, different asset conflict actions are taken based on the context:
Importing connections with the Replace/skip option
  • If the imported connection has the same name and contents as an existing connection, the action is skipped.
  • If the imported connection has the same contents as an existing connection with a different name, the action is skipped.
  • If the imported connection does not have the same name or contents as any existing connections, the connection is imported.
  • If the imported connection has the same name as an existing connection that contains different contents, the action depends on the selected conflict resolution option. If the skip option is selected, the action is skipped and existing values are not changed. If the replace action is selected, the existing connection is updated.
When you import DataStage flows that contain parameter sets, different asset conflict actions are taken based on the context:
Importing parameter sets with the Replace/skip option
  • If the imported parameter set has the same name as an existing parameter set, but the type is different, the action is skipped and a warning message is shown.
  • If the imported parameter set contains new parameters or value sets, the parameter set is imported and appended into the existing parameter set.
  • If the imported parameter set contains parameters of the same name and type or value sets of the same name, but different values, the action depends on the value of replace_mode.If you set replace_mode=hard, the values for the parameters and value sets are updated on import. If you set replace_mode=soft, the action is skipped and existing values are not changed.
  • If the imported parameter set contains a subset of the parameters and value sets in an existing parameter set, the import does not affect the extra parameters and value sets.

What to do next

See Migrating DataStage jobs for more information on other configuration changes that you might need to make.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more