Debugging a Job

The debugging function checks the business logic of your compiled SQL statements before the jobs are executed. It helps prevent unnecessary fees generated when you run streaming Flink SQL jobs. This function can only be used for Flink streaming SQL jobs.

Procedure

  1. In the navigation tree on the left pane of the CS management console, choose Job Management to switch to the Job Management page.
  2. On the Job Management page, locate the row where the target job resides and click Edit under Operation to switch to the Edit page.

    Figure 1 Job management

    For a job that is currently being created, you can debug the job on the Edit page.

  3. Click Debug to parse the compiled SQL statements. The Debugging Parameters page is displayed in the right pane of the Edit page.

    Figure 2 Debugging a job

  4. Set debugging parameters.

    • Dump Bucket: Select an OBS bucket to save debugging logs. If you select an unauthorized OBS bucket, click Authorize OBS.
    • Data Input Mode: The following two options are available:
      • OBS (CSV): You prepare OBS data first before using CS. For details, see Preparing Data. OBS data is stored in CSV format, where multiple records are separated by line breaks and different fields in a single record are separated by commas (,).
      • Manual typing: You compile SQL statements to configure an input stream as the data source. If manual recording is used, you need to enter the value of each field in a single record.
    • Set CAR_INFOS.
      • OBS: Select an OBS object as the input stream data.
      • Manual typing: Specify attribute parameters as prompted. Only one record is allowed for each input stream. See Figure 3.
        Figure 3 Debugging parameters

  5. Click Start Debugging. Once debugging is complete, the Debugging Result page appears.

    • If the debugging result meets expectations, the job is running properly.
    • If the debugging result does not meet expectations, there may be errors in the business logic. In this case, modify SQL statements and conduct debugging again.
      Figure 4 Debugging result