> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vacuum

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Databricks", "Amazon Redshift"]} unsupportedWarehouses={["Snowflake", "BigQuery"]} componentType="Orchestration" connectionInputs="One" connectionOutputs="One" />

Vacuum is an orchestration component that performs a vacuum operation on a list of tables. Vacuum is a housekeeping task that physically reorganizes table data according to its sort key, and reclaims space left over from deleted rows. Vacuum is almost always used at the end of an orchestration pipeline.

For more information about the vacuum process, read:

* Databricks [VACUUM documentation](https://docs.databricks.com/sql/language-manual/delta-vacuum.html).
* AWS [VACUUM documentation](https://docs.aws.amazon.com/redshift/latest/dg/r_VACUUM_command.html).

***

## Properties

<Tabs>
  <Tab title="Databricks">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[catalog] | warehouses: [databricks] --> */}

    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/en/data-governance/unity-catalog/index.html). The special value `[Environment Default]` uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [databricks] --> */}

    <ResponseField name="Schema (Database)" type="drop-down" required>
      The Databricks schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Create and manage schemas](https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[tablesToVacuum] | warehouses: [databricks] --> */}

    <ResponseField name="Tables to Vacuum" type="dual listbox" required>
      Select which tables to vacuum.
    </ResponseField>

    {/* <!-- param-start:[retentionPeriod] | warehouses: [databricks] --> */}

    <ResponseField name="Retention Period" type="integer" required>
      The retention threshold. The default is `7`, with the unit specified in **Retention Unit**.
    </ResponseField>

    {/* <!-- param-start:[retentionUnit] | warehouses: [databricks] --> */}

    <ResponseField name="Retention Unit" type="drop-down" required>
      Select the unit of the **Retention Period**. Options are **Day**, **Hour**, or **Week**. The default is Day.
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      Select the table schema. The special value `[Environment Default]` uses the schema defined in the environment. For more information on using multiple schemas, read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-start:[tablesToVacuum] | warehouses: [redshift] --> */}

    <ResponseField name="Tables to Vacuum" type="dual listbox" required>
      The tables to vacuum.

      Only one vacuum may be running at any one time across an entire Amazon Redshift cluster. Therefore, vacuums may fail due to concurrent workloads. This is usually harmless if the same tables will be vacuumed again on the next run of the pipeline. If this is the case, consider joining the "Failure" link of the component to an [End Success](/docs/components/end-success) component to prevent vacuum failure from failing the whole pipeline.
    </ResponseField>

    {/* <!-- param-start:[vacuumOption] | warehouses: [redshift] --> */}

    <ResponseField name="Vacuum Options" type="drop-down" required>
      The component reclaims disk space occupied by deleted rows in a table, using the method selected here:

      * **None:** A default vacuum operation. This is analogous to "FULL" in the current AWS implementation.
      * **FULL:** Is equivalent to DELETE ONLY if the target table is more than 95% sorted, otherwise will perform a full sort.
      * **SORT ONLY:** Sorts the table but does not reclaim disk space. Is quick at the expense of unclaimed memory.
      * **DELETE ONLY:** Will not sort tables and is consequently quicker than other methods.
      * **REINDEX:** Analyzes interleaved sort keys and performs a FULL sort.
    </ResponseField>
  </Tab>
</Tabs>
