Example–Deploying a data flow as a DataStage executable

In this topic, you will deploy a data flow that was created in the Design Studio using SQL warehousing operators. You will first convert the data flow into an XML file. Then import (deploy) the XML into the DataStage server.
About this topic

Shown below is a data flow created in the Design Studio using SQL warehousing operators.

Diagram shows a data flow created in the Design Studio using SQL warehousing operators.

You want to deploy this data flow onto the DataStage Server that is installed on a Windows computer. Save this data flow as dfexpression. Validate the data flow and then perform the following steps:

Procedure
  1. With the data flow displayed in the canvas, click anywhere inside the Design Studio canvas.
    Note: Make sure that none of the operators and connectors in the data flow are selected.
  2. Click the Properties tab. In the SQL Execution Database list, select CVSAMPLE as the database schema.
  3. On the Data Flow menu, click Deploy as Data Stage Executables. A directory dfexpression_datastage is created inside the generated-code directory of your data warehouse project. This directory contains a metadata XML file, a parallel job file and an SQL script file as shown below.

    Diagram shows the directory dfexpression_datastage created inside the generated-code directory of your data warehouse project.

  4. Click the DataStage Servers view. Right-click the DataStage server where you want to deploy the XML metadata file and select Deploy job metadata to server.... The Import DataStage Project Elements window opens.
  5. In the File Name text field, click the ellipsis icon (...) and select the XML metadata file dfexpression.xml to be deployed.
  6. Set up the location of the DataStage client. Click Window > Preferences > DataStage. Click the ellipsis (...) icon and browse to the directory where the DataStage client is installed.
  7. Click Import to selected project and then select the DataStage project where you want to deploy the metadata file.
  8. Click Import. The Import statistics are displayed to you. Click Finish to close the Import DataStage Project Elements window and return to the Design Studio explorer.
  9. If the DataStage server is installed on a machine different from the one where the Design Studio is installed, you must perform the following additional steps:
    1. Copy the sqw_runsqlscript.ksh file from the Design Studio machine to the DataStage Server. This script file is located inside the \Client\workspace\eclipse\plugins\com.ibm.datatools.sqwruntime.tasks\scripts directory of the InfoSphere™ Warehouse installation directory.
    2. Copy the generated SQL file dataflowname.sql from the Design Studio machine to the DataStage Server. This SQL file is located inside the \Client\workspace\data warehouse project name\generated-code\data flow name_datastage directory of the InfoSphere Warehouse installation directory.
  10. Inside the Job Status view, right-click the job and select Launch DataStage Designer. The job sequence corresponding to the data flow opens in the DataStage Designer as shown below.

    Diagram shows the job sequence corresponding to the data flow open in the DataStage Designer.

    Note: If the job name is not displayed inside the Job Status view, you might have to close the Design Studio instance and restart the Design Studio again. Refresh the Job Status view. The job name must appear in the Job Status view.
  11. Inside the DataStage Designer, double-click the Execute_Command_0, and browse to the full path on the DataStage server where the sqw_runsqlscript.ksh file is saved. Save the job and close the job.
  12. Return to the Design Studio, right-click the job in the Job Status view and click Compile Job. The job status changes to compiled.


Feedback | Information roadmap