Updated on 2026-09-08 GMT+08:00

Configuring a Bucket for Saving Job Results

Scenario

DLI allows you to save the results of SQL jobs to a DLI job bucket for persistent storage and management.

Notes and Constraints

  • Once enabled, the job result saving policy cannot be disabled. Job results will always be saved to the DLI job bucket specified by the user.
  • For users who subscribed to and used DLI before May 2024, a service ticket must be submitted to enable SQL job result saving to a DLI job bucket.

    Starting from May 2024, new users can use this feature without submitting a request.

  • This parameter is only available for Spark SQL queues.
  • Before enabling this feature, make sure you have configured a DLI job bucket. For how to configure a DLI job bucket, see Step 1: Configure the DLI Job Bucket.

    To check if you have enabled saving SQL job results to a DLI job bucket, see How Do I Check if Job Result Saving to a DLI Job Bucket Is Enabled for a SQL Queue?.

Step 1: Configure the DLI Job Bucket

For more constraints on configuring the DLI job bucket, see Configuring a DLI Job Bucket.

  1. Log in to the DLI management console.
  2. In the navigation pane, choose Global Configuration > Project.
  3. On the Project page, click next to Job Bucket to configure bucket information.
    Figure 1 Project
  4. Click to view available buckets.
  5. Select the bucket for storing the temporary data of the DLI job and click OK.
    Temporary data generated during DLI job running will be stored in the OBS bucket.
    Figure 2 Setting the job bucket

Step 2: Enable Job Result Saving to a DLI Job Bucket

  1. Log in to the DLI management console.
  2. In the navigation pane, choose Resources > Queue Management.
  3. Locate the queue for which you want to set properties, click More in the Operation column, and select Set Property.
  4. Go to the queue property setting page and set property parameters. Table 2 describes the property parameters.
    Table 1 Queue properties

    Property Type

    Property

    API Parameter

    Description

    Job result saving policy

    Set Result Saving Policy

    job.saveJobResultToJobBucket

    Whether to save job results to a DLI job bucket.

    This parameter is only available for Spark SQL queues.

  5. Click OK.

How Do I Check if Job Result Saving to a DLI Job Bucket Is Enabled for a SQL Queue?

  • Method 1: View the result path on the SQL job details page.
    1. Log in to the DLI management console.
    2. In the navigation pane, choose Job Management > SQL Jobs.
    3. Locate a desired SQL job and click next to the queue name to expand the job details.
    4. Check the result path in the job details.
      • If the result path displays a custom DLI job bucket, the feature of saving job results to a DLI job bucket is enabled for the queue running the job.
      • If the result path is not displayed in the job details, the feature is not enabled for the queue running the job.
  • Method 2: Check whether job result saving to a job bucket is enabled in the SQL queue properties.
    1. Log in to the DLI management console.
    2. In the navigation pane, choose Resources > Queue Management.
    3. Locate the queue for which you want to set properties, click More in the Operation column, and select Set Property.
    4. On the Set Property dialog box that appears, check whether the feature is enabled.

Job Result Return Limits When Using JDBC to Submit SQL Jobs to DLI

When you use JDBC to submit SQL jobs to DLI, there are limits on how many job results can be returned. For details, see Table 2. For how to use JDBC to connect to DLI and submit SQL jobs, see Submitting a SQL Job Using JDBC.
Table 2 Job result return limits

JDBC Version

Result Return Limit

Description

dli-jdbc-1.X

No limit (controlled by the directfetchthreshold parameter, which defaults to 1000).

You can adjust the directfetchthreshold parameter to set the limit on the number of job results returned.

dli-jdbc-2.X (for users who subscribed to DLI before May 2024)

A maximum of 1,000 job results can be returned.

Saving job results into buckets is currently in limited use. To use it, submit a service ticket.

Once enabled, configure a bucket for saving job results as described in this section. More than 1,000 results can be queried from the job bucket.

dli-jdbc-2.X (for users who subscribed to DLI from May 2024 onward)

No limit

New users can save job results to a configured DLI job bucket without having to submit a request first.