Select Columns Transform

Creates a transformation that selects the same subset of columns as in the given dataset

Category: Data Transformation / Manipulation


Applies to: Machine Learning Studio (classic)

This content pertains only to Studio (classic). Similar drag and drop modules have been added to Azure Machine Learning designer. Learn more in this article comparing the two versions.

This article describes how to use the Select Columns Transform module in Azure Machine Learning Studio (classic). The purpose of the Select Columns Transform module is to ensure that a predictable, consistent set of columns is always used in downstream machine learning operations.

This module is particularly helpful for tasks such as scoring, which require specific columns. Changes in the available columns might break the experiment or change the results.

You use the Select Columns Transform to create and save a set of columns. Then, use the Apply Transformation module to apply those selections to new data.

How to use Select Columns Transform

This scenario assumes that you intend to use feature selection to generate a dynamic set of columns that will be used for training a model. To ensure that column selections are the same for the scoring process, you use the Select Columns Transform module to capture the column selections and apply them elsewhere in the experiment.

  1. Add an input dataset to your experiment in Studio (classic).

  2. Add an instance of Filter Based Feature Selection.

  3. Connect the modules and configure the feature selection module to automatically find some number of best features in the input dataset.

  4. Add an instance of Train Model and use the output of Filter Based Feature Selection as the input for training.


    Because feature importance is decided based on the values in the column, you cannot know in advance which columns might be available for input to Train Model.

  5. Now, attach an instance of the Select Columns Transform module.

    This generates a column selection as a transformation that can be saved or applied to other datasets. This step ensures that the columns identified by feature selection are saved for reuse by other modules.

  6. Add the Score Model module.

    Do not connect the input dataset.

    Instead, add the Apply Transformation module, and connect the output of the feature selection transformation.


    You cannot expect to apply Filter Based Feature Selection to the scoring dataset, and get the same results. Since feature selection is based on values, it might choose a different set of columns, which would cause the scoring operation to fail.

  7. Run the experiment.

This process of saving and then applying a column selection ensures that the same data schema is available for training and scoring.


For examples of how to use this module, see the Azure AI Gallery:

Expected inputs

Name Type Description
Dataset with desired columns Data Table Dataset containing desired set of columns


Name Type Description
Columns selection transformation ITransform interface Transformation that selects the same subset of columns as in the given dataset.


Exception Description
Error 0003 Exception occurs if one or more of inputs are null or empty.

See also

Select Columns in Dataset