Xcalar in modeling mode cannot run batch dataflows. This topic applies to Xcalar in operational mode only.
After you create a batch dataflow, you can run the dataflow at regular intervals.
Preparing a batch dataflow to run on schedule involves two steps:
- Parameterize the export operation.
- Create a schedule for the batch dataflow.
If Xcalar detects that an export file of the same name already exists, the batch dataflow fails to run. Therefore, you must parameterize the export operation so that repeated runs of the batch dataflow can create export files under new names.
Follow these steps to parameterize the export operation:
- In the dataflow list, click the name of the batch dataflow to display it.
- Right click the last icon of the batch dataflow to display a pop-up menu. This icon represents the result of the batch dataflow.
- Click Create Parameterized Operation in the pop-up menu.
If the Export As field is not filled in, click the Default value button to automatically add the default export file name in the field, as shown in the following screenshot. Alternatively, you can copy and paste the original folder name.
In the Parameterize Operation window, click and drag the N parameter to the file name shown in the Export As field. This parameter is a system parameter. Its initial value is 0 and is incremented by 1 each time the operation is run.EXAMPLE: If the export file name is export-airlines#XS366.csv, you can drag the N parameter to the name so that the name becomes export-airlines<N>#XS366.csv. Running the batch dataflow the first time creates a file named export-airlines0#XS366.csv, running the batch dataflow the second time creates a file named export-airlines1#XS366.csv, and so on.
If the Target field is empty, click the Default value button to automatically add the default target name in the field. Alternatively, you an copy and paste the original target name.
- Click SAVE.
For more information about parameterization, see Parameterizing operations.
Follow these steps to create a schedule for a batch dataflow:
In the dataflow list, click for the selected batch dataflow as illustrated in the following screenshot.
The Create New Schedule panel is displayed.
You can specify a schedule in either simple mode, as described in this step, or in advanced mode, as described in step 3. (Advanced mode is recommended only for users familiar with the cron utility on UNIX systems.)
Specify the following information in the Create New Schedule panel. For more information about how to specify the information, see the screenshot following the list.
- The start time, which is set by a calendar and a 12-hour clock. It determines the first time the batch dataflow will be run. The time is in UTC; it is not your browser time. You must specify a time in the future. To check the current UTC time, see the time displayed in the upper right corner of the window.
- How often the batch dataflow is run.
Go to step 4.
To specify a schedule in advanced mode, enter a cron expression in the Schedule field. Then click SIMULATE. The Last Run and Next Run fields display the times when two consecutive runs can take place. These times help you visualize the interval between any two runs if the batch dataflow is executed according to your schedule.IMPORTANT: The cron expression in this window allows only asterisk, digit, forward slash, comma, and hyphen. Do not use other characters even though they are valid on other UNIX systems.
In the following example, the batch dataflow runs every minute, every day, starting at 4 p.m. until 4:59 p.m. The time specified in the cron expression is the server time.
- Click SAVE. The Schedule Detail window is displayed. This schedule is now associated with the batch dataflow, and it takes effect immediately. The schedule is persistent across
clusterrestarts, but is not retained when you download the batch dataflow.
Pausing a batch dataflow schedule
After you create a batch dataflow schedule, you can click PAUSE in the Schedule Detail window to suspend the schedule. If you click RESUME after the schedule is paused, the schedule takes effect again.
Deleting a batch dataflow schedule
Follow these steps to delete a batch dataflow schedule:
- In the dataflow list, click the name of the batch dataflow.
- Click DELETE in the Schedule Detail window.
- When the confirmation message is displayed, click CONFIRM. (You cannot undo a schedule deletion.)
Displaying run information
If a schedule exists for a batch dataflow, clicking the batch dataflow name in the Dataflows panel displays a history of the runs.
The following screenshot shows an example of the run history. To update the result, click REFRESH.
For each run, a color dot precedes the run number to indicate status. The following list explains the meaning of the color:
- Green means the run is successful.
- Orange means the run is in progress.
- Red means the run fails.