> ## 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.

# ML Classification

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={["Snowflake"]} unsupportedWarehouses={["Databricks", "Amazon Redshift", "BigQuery"]} componentType="Transformation" connectionInputs="One" connectionOutputs="Unlimited" />

<Badge color="green" shape="pill" stroke size="lg">Public preview</Badge>

<Info>
  Production use of this feature is available for specific editions only. [Contact our sales team](https://www.matillion.com/contact) for more information.
</Info>

The **ML Classification** transformation component uses the Snowflake [Classification](https://docs.snowflake.com/en/user-guide/ml-functions/classification) machine learning (ML) function to sort data into different classes using patterns detected in training data. The component supports both binary classification (two classes) and multi-class classification (more than two classes).

The component requires that you already have a trained classification model in your warehouse. This involves creating a classification model object and passing in a reference to the training data. The model is fitted to the provided training data. You then use the resulting schema-level classification model object to classify new data points and to understand the model's accuracy through its evaluation APIs.

<Note>
  Read Snowflake's [documentation](https://docs.snowflake.com/en/user-guide/ml-functions/classification) for a full explanation of classification models, and for details about limitations, costs, preparation, and more.
</Note>

### Use case

Common use cases of classification include customer churn prediction, credit card fraud detection, and spam detection, as described in Snowflake's [documentation](https://docs.snowflake.com/en/user-guide/ml-functions/classification).

***

## Properties

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

{/* <!-- param-start:[database] | warehouses: [snowflake] --> */}

<ResponseField name="Database" type="drop-down" required>
  The Snowflake database that the classification model resides in. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
</ResponseField>

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

<ResponseField name="Schema" type="drop-down" required>
  The Snowflake schema that the classification model resides in. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
</ResponseField>

{/* <!-- param-start:[model] | warehouses: [snowflake] --> */}

<ResponseField name="Model" type="drop-down" required>
  The model to use. Read the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/ml-functions/classification#training-using-viewing-deleting-and-updating-models) to learn more about creating and using models.
</ResponseField>

{/* <!-- param-start:[onError] | warehouses: [snowflake] --> */}

<ResponseField name="On Error" type="drop-down" required>
  * **ABORT:** Abort the entire prediction operation if any rows result in an error.
  * **SKIP:** Skip any rows that result in an error. The error is shown instead of the results for that row.
</ResponseField>

{/* <!-- param-start:[predictionColumnName] | warehouses: [snowflake] --> */}

<ResponseField name="Model Output Column Name" type="string" required>
  The name of the column where the model's output will be stored.
</ResponseField>

{/* <!-- param-start:[classColumnName] | warehouses: [snowflake] --> */}

<ResponseField name="Class Column Name" type="string" required>
  The name of the column where the classifications will appear. The predicted class is extracted from the model output for the user.

  For example, if your data's classification will be either "true" or "false", a column will be created that explicitly lists "true" and "false" values for each row classified.
</ResponseField>

{/* <!-- param-start:[includeInputColumns] | warehouses: [snowflake] --> */}

<ResponseField name="Include Input Columns" type="boolean" required>
  * **Yes:** Includes both the column names of the input data and the output columns `Model Output Column Name` and `Class Column Name`.
  * **No:** Only includes the `Model Output Column Name` and `Class Column Name` columns.
</ResponseField>
