百度智能云

All Product Document

          Data Warehouse

          SHOW-EXPORT

          SHOW EXPORT

          Description

          This statement is used to show the execution of specified export tasks.

          SHOW EXPORT
          [FROM db_name]
          [
              WHERE
              [EXPORT_JOB_ID = your_job_id]
              [STATE = ["PENDING"|"EXPORTING"|"FINISHED"|"CANCELLED"]]
          ]
          [ORDER BY ...]
          [LIMIT limit];
          • db_name:View jobs under the specified database. If the database is not specified, then use the current database.
          • WHERE:results can be filtered by EXPORT_JOB_ID or STATE .
          • ORDER BY LIMIT:support ordering and paging result sets by any column.

          Description of return results:

               JobId: 14008
               State: FINISHED
            Progress: 100%
            TaskInfo: {"partitions":["*"],"exec mem limit":2147483648,"column separator":",","line delimiter":"\n","tablet num":1,"broker":"hdfs","coord num":1,"db":"default_cluster:db1","tbl":"tbl3"}
                Path: bos://bj-test-cmy/export/
          CreateTime: 2019-06-25 17:08:24
           StartTime: 2019-06-25 17:08:28
          FinishTime: 2019-06-25 17:08:34
             Timeout: 3600
            ErrorMsg: N/A
          • JobId: unique ID of job
          • State: Job status:

            • PENDING:job pending for scheduled
            • EXPORTING:exporting data
            • FINISHED:job finished successfully
            • CANCELLED:job failed
          • Progress:job progress. The progress takes query plan as unit. Assuming that there are 10 query plans in total and 3 of which have been completed at present, then the progress is 30%.
          • TaskInfo:Job information shown in Json format:

            • db: Database name
            • tbl: Table name
            • partitions: specify the exported partition.* * represents all partitions.
            • exec mem limit: query the planned use limit of memory, in bytes.
            • column separator: column separator of export file.
            • line delimiter: line separator of export file.
            • tablet num: total number of Tablet involved.
            • broker: name of broker used.
            • coord num: number of query plans.
          • Path: export path on remote storage.
          • CreateTime/StartTime/FinishTime: job create time, start time and finish time.
          • Timeout: job timeout period, in seconds, starting from Create Time.
          • ErrorMsg: if there is an error in the job, the error reason will be displayed here.

          Example

          1. Show all export tasks under default db

            SHOW EXPORT;
          2. Show the export tasks under specified db, order in descending order of StartTime

            SHOW EXPORT FROM example_db ORDER BY StartTime DESC;
          3. Show the export task under specified db, the state is "exporting", and order in descending order of StartTime

            SHOW EXPORT FROM example_db WHERE STATE = "exporting" ORDER BY StartTime DESC;
          4. Show the export task under specified db and specified job_id

            SHOW EXPORT FROM example_db WHERE EXPORT_JOB_ID = job_id;

          Keywords

          SHOW, EXPORT

          Previous
          SHOW-GRANTS
          Next
          SHOW-ROUTINE-LOAD-TASK