Retrieving Job Results - Query Scheduler

Teradata Query Scheduler User Guide

Product
Query Scheduler
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2512
lifecycle
previous
Product Category
Teradata Tools and Utilities

Retrieving Job Results

Use the Retrieve Result Data command to get the results data for any selected job in a Complete status.

Note: This command is available only if Teradata SQL Assistant 6.0 or later is installed on your system.

The presence of Teradata SQL Assistant is automatically checked each time the Teradata Query Scheduler Viewer is started. Each time this command is used, a new instance of Teradata SQL Assistant is executed so that multiple queries can run simultaneously.

Using the Retrieve Result Data command launches Teradata SQL Assistant with one of the following options:

  • The SQL to retrieve the result data from the job’s results table. To learn more, see “Retrieving Results from a Database Table” on page 52.
  • The name of a local copy of the results file. To learn more, see “Retrieving Results from a Teradata QS Server File” on page 53.
  • Note: How the request was submitted determines which option is used.

    Retrieving Results from a Database Table

    When a results table is being retrieved, Teradata SQL Assistant connects to the Teradata Database and gets the results from the results table.

    Then, depending on the settings chosen in the Query Scheduler Viewer Settings dialog box, Teradata SQL Assistant does one of the following

  • Retrieves and loads the results set in a Teradata SQL Assistant answer set window.
  • Retrieves and exports the results set, and then terminates without showing the results.
  • To learn about setting the Teradata SQL Assistant option, see “Choosing a SQL Assistant Export Setting” on page 36.

    To retrieve results from a database table

    1 Check that the Teradata ODBC Data Source Name is configured for the Teradata Database. Ensure the name matches the Database Name entered in the Scheduler Viewer’s Teradata Query Scheduler Connect dialog box as described in the topic, “Connect to a Teradata QS Server” on page 27.

    If a matching ODBC DSN has not been defined, Teradata SQL Assistant displays the following error when attempting to connect to a Teradata Database:
    Data source name not found and no default driver specified.

    2 From the Teradata Query Scheduler Viewer, select a job in a Complete status from the Jobs list.

    3 Click Options>Retrieve Result Data, or click , or right-click the request to display a shortcut menu and click Retrieve Result Data.

    Teradata SQL Assistant opens, connects to the Teradata Database, and gets the results from the database table. Next, one of the following events occurs:

  • The results are exported and Teradata SQL Assistant closes without showing the results.
  • The results are loaded in a Teradata SQL Assistant answer set window.
  • To save an answer set to a file, see Teradata SQL Assistant for Microsoft Windows User Guide (B035‑2430).

    Retrieving Results from a Teradata QS Server File

    When results from a file are being retrieved on the Teradata QS Server, the Teradata QS Viewer prompts for the name of a local file into which to copy the results. Next, the Teradata QS Viewer gets the results from the Teradata QS server file and copies them to the local file using tabs as field delimiters.

    Then Teradata SQL Assistant is invoked with the local file name. Teradata SQL Assistant opens, retrieves the results from the local file, and loads them in a Teradata SQL Assistant answer set window.

    To retrieve results from a Teradata QS Server text file

    1 From the Teradata Query Scheduler Viewer, select a job in a Complete status from the Jobs list.

    2 Click Options>Retrieve Result Data, or click , or right-click the request to display a shortcut menu and click Retrieve Result Data.

    3 A prompt appears for the name of a local file where to copy the results.

    The Teradata Query Scheduler Viewer gets the results from the Teradata QS server file and copies them to the local file. Then Teradata SQL Assistant is invoked with the local file name.

    Teradata SQL Assistant opens, retrieves the results from the local file, and loads them in a Teradata SQL Assistant answer set window.