Home | Table of Contents | Enable/Disable Component | CloverETL 4.6.1
--- | --- | ---
Prev | Components | Next

## Enable/Disable Component

Each component can be enabled or disabled. It can be turned on or off explicitly or by using a graph parameter. In subgraphs, components can be enabled in dependence on connected or disconnected ports of a subgraph component.

When you disable a component, it becomes grey and does not parse data when the process starts. If a component is disabled, data coming to the component is sent to the next one. If there is no such component, the graph fails.

Data parsed by a component must be sent to other components and if it is not possible, parsing is impossible as well.

Disabling can be done in the context menu or Properties tab. You can see the following example of a situation when parsing is possible even with a disabled component:

Figure 30.5. Running a Graph with Disabled Component

You can see that data records from the disabled component are not necessary for the Merge component and for this reason parsing is possible. Nevertheless, if you disabled the Merge component, readers before this component would not have at their disposal any component to which they could send their data records and graph would terminate with an error.

### Enabling Component

Choose the component and right click to display the Context Menu. Select Enable.

The component is enabled. All components are enabled by default.

You can enable the component by pressing Shift+E, too.

### Disabling Component

Choose the component and right click to display the Context Menu. Select Disable.

Component is disabled. Any records sent to the component will be passed through (will be sent to the following component).

You can disable the component by pressing Shift+D, too.

### Enabling by Graph Parameter

Choose the component and right click to display the Context Menu. Select Enable with condition → By Graph Parameter. Finally, select the right parameter from a dialog.

If there is no suitable parameter, you can create a new one. In the dialog, click the Create new parameter button.

The component will be enabled or disabled depending on a value of the graph parameter. The graph parameter has to contain one of the following values:

- `enabled` - the component is enabled (it has an alias `true`).

- `disabled` - the component is disabled (it has an alias `false`).

- `trash` - the component will behave like Trash component, all following components are disabled.

| Note
You need an existing graph parameter to see the By Graph Parameter option.

### Enabling by Connected Input Port

This option is available in subgraphs with optional ports only - at least one port of a subgraph has to be marked as optional to see the option in a context menu.

Choose the component and right click to display the Context Menu. To enable the component in case the first input port is connected, select Enable → Input Port 0 → Is Connected.

You can choose another port depending on your graph and intention. You can also enable the component in case the port is disconnected by using the Is Disconnected option.

See also Optional Ports.

### Disable as Trash

Disable as Trash disables all subsequent components. The component behaves like Trash - it discards all incoming records.

Right click the component and select Disable as Trash from context menu. A trash icon appears on the component and all subsequent components turn grey.

Disable as Trash is useful for graph development.

You can Disable as Trash the component by pressing Shift+T too.

### Compatibility

Enabling/disabling of component was changed in 4.1.0-M1. Until 4.1.0-M1, components could have been disabled without setting up pass through mode.

Since CloverETL 4.1.0, you can use Disable as Trash.

Prev | Up | Next
Edit Component Dialog | Home | Table of Contents | Passing Data through Disabled Component