Starburst Galaxy

  •  Get started

  •  Working with data

  •  Data engineering

  •  Developer tools

  •  Cluster administration

  •  Security and compliance

  •  Troubleshooting

  • Galaxy status

  •  Reference

  • Schedule tasks #

    The jobs pane allows you to run statements on a schedule. These scheduled statements are known as SQL jobs.

    Scheduling is best suited for data maintenance statements, such as CREATE, DROP, REFRESH, MERGE and TRUNCATE. Statements that return results are not supported, which excludes statements that begin with SELECT; however SELECT as part of a statement is supported.

    View SQL jobs #

    The All SQL jobs section of the Jobs pane displays a list containing all SQL jobs. Use this section to create, view, search for, and manage SQL jobs.

    The SQL jobs list displays the following columns:

    • Name: Name of the SQL job. Click the column heading to sort in ascending or descending alphabetical order.
    • Description: The description provided for the SQL job.
    • Last run status: When the SQL job was last run.
    • Executing role: The role running the SQL job.
    • Last run ended: The date and time the last SQL job run ended.
    • Next run starts: The next date and time the SQL job is scheduled to start running. If the schedule is paused, the status of the schedule also appears here.

      All SQL jobs pane

    Create a SQL job #

    To run a statement on a recurring schedule, click Create SQL job, then provide the following information in the New SQL Job dialog:

    • In the Name and description section, enter a name for the job and a useful description.

    • In the Query section:

      1. Expand the first drop-down menu, and choose a cluster to run the statement on. We recommend using a fault tolerant cluster.

      2. From the drop-down menu, select a role to run the statement. The role must have the MANAGE_SECURITY privilege.

      3. Enter the statement you want to run.

    • In the Schedule section:

      1. Choose a timezone from the drop-down menu.

      2. Choose the Select frequency or Enter cron expression recurring interval format.

      For Select frequency: Choose an hourly, daily, weekly, monthly, or annual schedule from the drop-down menu. The corresponding values depend on the schedule selected:

      • Hourly: Enter a value between 1 minute and 59 minutes.
      • Daily: Enter a time in the format hh:mm, then specify AM or PM.
      • Weekly: Enter a time in the format hh:mm, specify AM or PM, then select a day of the week.
      • Monthly: Enter a time in the format hh:mm, specify AM or PM, then select a date.
      • Annually: Enter a month, day, hour, and minutes in the format MM/DD hh:mm. Specify AM or PM.

      For Enter cron expression: Enter the desired schedule in the form of a cron expression. For example, a SQL job run weekly at 9:30 AM on Monday, Wednesday, and Friday:

    30 9 * * 1,3,5
    
    • Click Create SQL job.

      New SQL job dialog

    View SQL job details #

    To view the details of a SQL job, click the name of the job. The header Scheduled query details pane displays the following information about your SQL job:

    • Description: The description provided for the SQL job.
    • Next run: The next date and time the SQL job is scheduled to run. If the schedule is paused, the status of the schedule also appears here.
    • Cluster: The chosen cluster.
    • Executing role: The role running the SQL job.

    Run now allows you to run the SQL job instantly.

    You have the option to prevent the next SQL job run. Use the more_vert options menu to pause and resume the schedule.

    Completed statements and statements in progress appear in the Query history section, which displays the following information:

    • Query ID: A unique identifier for each statement. Click the Query ID to view statement details.
    • Status: check_circle for successfully completed statements and close for failed statements.
    • Started: Date and time the statement started running.
    • Elapsed time: Total duration for processing the statement.
    • Query progress: How much of the process is completed; shown as a percentage.

    To see statement details, click the Query ID.

    Scheduled query details

    Manage SQL jobs #

    You can manage SQL jobs in the All SQL jobs pane and in Scheduled query details. Click the more_vert options menu to edit, delete, pause, and resume the selected SQL job.