Starburst Galaxy

  •  Get started

  •  Working with data

  •  Data engineering

  •  Developer tools

  •  Cluster administration

  •  Troubleshooting

  • Galaxy status

  •  Reference
  • Schedule tasks #

    The All SQL jobs section of the Jobs pane displays a table containing all statements set to run on a recurring schedule. Use this secion to create, view, search for, and manage scheduled statements.

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

    Scheduled statements are sorted into the following columns:

    • Name: The name of the scheduled statement.
    • Description: The description provided for the statement.
    • Last run status: When the statement was last run.
    • Executing role: The role running the statement.
    • Last run ended: The date and time the last statement run ended.
    • Next run starts: The date and time the statement is scheduled to start running.

      All SQL jobs pane

    Create a schedule #

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

    • In the Name and description section, enter a name for your scheduled statement 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. Select a role to run the statement from the drop-down menu. The role must have the MANAGE_SECURITY privilege.

      3. Enter the statements you want to run.

    • In the Schedule section:

      1. Choose a time zone 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 repeat cycle from the drop-down menu. The corresponding values depend on the repeat cycle 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 repeat cycle in the form of a cron expression. For example, a cycle scheduled to run weekly at 9:30 AM on Monday, Wednesday, and Friday:

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

      New SQL job dialog

    Scheduled query details #

    To view the details of a scheduled statement, click the name of the statement. The Scheduled query details pane describes the statement and its environment, and lists its run history, which includes elapsed time and progress for statements currently underway. Run now allows you to run the scheduled statement instantly.

    Scheduled query details

    Managing scheduled statements #

    You can manage statements in the All SQL jobs pane and in Scheduled query details. Click the more_vert options menu to edit or delete the selected statement.