Alter Session WLM Slots

Alter Session WLM Slots

This component allows users to alter the WLM (Workload Management) slots for a particular job run. Note that only components that run after 'Alter Session WLM Slots' will be affected by the change in slots.

The component works by altering the wlm_query_slot_count for the current session. For more information on Workload Management and slots, please refer to the Amazon Documentation. The default number of slots is always 1 if not using this component or otherwise manually altering the value.

Note that this affects queries on the Redshift server and so components such as data stagers ('query' components), that generally query an outside data source, will remain unaffected by the additional slots.


Properties

Property Setting Description
Name Text The descriptive name for the component.
Slot Count Integer The number of WLM slots to set for this session.

Example

In this example we have a deleted many rows from a table of flight data in order to better focus future transformations. The job ends in a Vacuum operation to reclaim space taken by the deleted rows. This can be a slow process but thankfully we can speed it up by increasing the number of slots available for this job using the Alter Session WLM Slots component.

To illustrate the benefits of assigning additional slots to the session, we can run this job twice; once with a single slot and once with 3 slots. To change the number of slots, simply edit the 'Slot Count' property of the Alter Session WLM Slots component.

After running the job, we can expand our task in the Task panel and see how long the vacuum operation took. Below we see the timing for each run.

We can see that 3 slots completes the vacuum operation almost 3 times faster than a single slot. Requesting more slots than you are allowed will result in an error similar to below.