Validating or Submitting an SQL Query

Problem

You want to either validate that the code in an SQL query works properly when the SAS Data Integration Studio job that contains it is run at a later time or immediately submit the query as part of a job.

Solution

You can validate the code in an SQL query in the Designer window for the SQL Join transformation. This approach can be helpful when you want to make sure that your query runs properly and returns the data that you are seeking. You can also submit the query as part of the SAS Data Integration Studio job that contains the SQL Join transformation.

Tasks

Validate the Code in an SQL Query

Perform the following steps to validate a query in the Designer window:
  1. Click Validate SQL in the toolbar at the top of the Designer window.
  2. Examine the Log tab that is displayed in the Designer window to verify that the query was submitted successfully or to troubleshoot an unsuccessful submission.
Note: You can use the Runtime Manager in SAS Data Integration Studio to cancel the SQL query. The SQL Join transformation is displayed as a row in the Runtime Manager. You can right-click the row and click Stop Job to cancel the query. (You can also click Stop in the Designer window toolbar.) The SQL Join transformation is currently the only transformation that supports this type of cancellation.

Submit a Query As a Part of a SAS Data Integration Studio Job

Perform the following steps to submit a query from the SAS Data Integration Studio job:
  1. Submit the query in one of the following ways:
    • Click Run on the SAS Data Integration Studio menu bar.
    • Right-click in the Job Editor window. Then, click Run.
    • Click Run on the SAS Data Integration Studio Actions menu.
  2. Validate the job as needed. For example, you can check the properties of the target table. You can also review the data that is populated into the target table in the View Data window. Finally, you can examine the Log tab to verify that the job was submitted successfully or to troubleshoot an unsuccessful submission.
Note: You can click Run to Selected Transform on the Designer window toolbar to specify that only the steps that are placed before the SQL query code are submitted. (These steps are used to create the source tables for the query.)
Last updated: January 16, 2018