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.
- Log in to the DLI management console.
- In the navigation pane, choose Global Configuration > Project.
- On the Project page, click
next to Job Bucket to configure bucket information. Figure 1 Project
- Click
to view available buckets. - 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
- Log in to the DLI management console.
- In the navigation pane, choose Resources > Queue Management.
- Locate the queue for which you want to set properties, click More in the Operation column, and select Set Property.
- 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.
- 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.
- Log in to the DLI management console.
- In the navigation pane, choose Job Management > SQL Jobs.
- Locate a desired SQL job and click
next to the queue name to expand the job details. - 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.
- Log in to the DLI management console.
- In the navigation pane, choose Resources > Queue Management.
- Locate the queue for which you want to set properties, click More in the Operation column, and select Set Property.
- 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
| 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. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot