Exporting SQL Job Results
Store the data results of analyzed SQL jobs in a specified location in the desired format.
By default, DLI stores SQL job results in its job bucket. You can also download job results to a local host or export job results to a specified OBS bucket.
Exporting Job Results to the DLI Job Bucket
DLI specifies a default OBS bucket for storing job results. You can configure the bucket information on the Global Configuration > Project page of the DLI management console. Once a job is complete, the system automatically stores its results to this bucket.
- You have configured the job bucket on the Global Configuration > Project page of the DLI management console by referring to Configuring a DLI Job Bucket.
- You have submitted a service ticket to request the whitelisting of the feature that allows writing job results to buckets.
- The user who executes jobs has been granted read and write permissions either on the job bucket or on the jobs/result path of the job bucket.
For details, see Creating a Custom Bucket Policy.
For how to obtain job results from the DLI job bucket, see "Object Management" > Downloading Objects in Object Storage Service User Guide.
Exporting Job Results to a Specified Location in Another Bucket
In addition to storing job results in the default bucket, you can also export them to a specified location in another bucket, increasing the flexibility of job result management and making it easier to organize and manage them.
On the console, you can only view a maximum of 1,000 job results. To view additional results, you can export them to an OBS path. The procedure is as follows:
You can export job results on either the SQL Jobs or the SQL Editor page.
- SQL Jobs page: In the navigation pane on the left, choose Job Management > SQL Jobs. On the displayed page, locate the row containing a desired job, click More in the Operation column, and select Export Result.
- SQL Editor page: In the navigation pane on the left, choose SQL Editor. On the displayed page, once query statements are successfully executed, click next to the View Result tab to export job results.
- If there are no numerical columns in the query results, job results cannot be exported.
- Ensure that the user who exports job results has the read and write permissions on the OBS bucket.
Parameter |
Mandatory |
Description |
---|---|---|
Data Format |
Yes |
Choose a data format for the job results you want to export. The options include json and csv. |
Queues |
Yes |
Select the queue where the job is executed. SQL jobs can only be executed on SQL queues. |
Compression Format |
No |
Compression format of the data to be exported. The options are:
|
Storage Path |
Yes |
Path in an OBS bucket where the job results are exported
|
Export Mode |
Yes |
|
Number of Results |
No |
Number of results to be exported If you do not specify or set it to 0, all results will be exported. |
Table Header |
No |
Whether the job results to be exported contain table headers |
Exporting Job Results to a Local Host
You can download the results of asynchronous DDL and QUERY statements to a local directory. By default, you can download a maximum of 1,000 data records to a local host.
The procedure is as follows:
- Locate the row containing a desired job whose asynchronous DDL or QUERY statement has been successfully executed, click More in the Operation column, and select Submit Download Request. In the displayed dialog box, click OK. After a few seconds, the Submit Download Request button would change to Download.
Figure 1 Selecting Submit Download Request
- Click Download to download the results to your local host.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.