Documentation

    Select

    Choose which columns to keep, rename and reorder them, and convert their data types. New columns pass through by default; turn off Automatically include new columns to keep a fixed selection.

    Prepare an order table

    This table has an order reference, an amount and an internal note for each order. Select starts by keeping all three columns.

    The live example needs a desktop screen. The result it produces is shown here, and the explanation and settings below work on any screen.

    Result
    orderamountnote
    ORD-10112.50Checked
    ORD-1028.00Follow up
    ORD-103pendingAwaiting price
    1. Clear the Keep checkbox for note. The notes disappear from the output, while all three orders stay.
    2. Enter order_id in Rename To for the order column. The output now uses that heading.
    3. Change Type for amount from VARCHAR to DOUBLE. The amounts become decimal numbers. The pending value becomes NULL because it can't be converted to a number.
    4. Use the up arrow beside amount to move it before order. The amount column now appears first in the output.

    When to use

    Use Select to keep the columns you need, rename them, reorder them or change their type. To remove rows instead of columns, use Filter.

    Read the output

    The example starts with three orders. Manual Input reads amount as VARCHAR text only because of the pending value, even though the other amounts look like numbers. Before you change any settings, Select passes those columns through with their original names and types.

    After the steps, the output has amount followed by order_id. The internal notes are gone. The amounts 12.5 and 8 are now DOUBLE numbers, while order_id stays VARCHAR text. The order with a pending amount is still present, but its amount is now NULL.

    Select changes the output of this block. The table from Manual Input doesn't change.

    Choose a type that fits the values

    Choose DOUBLE for decimal numbers such as the amounts in this example, or BIGINT for whole numbers. VARCHAR stores text, BOOLEAN stores true or false values, DATE stores dates and TIMESTAMP stores dates with times.

    Changing a type converts the values; it doesn't just change how they look.

    To have Strata choose data types from the values automatically, see Auto Field.

    To keep or remove rows based on their values, use Filter.

    Inputs and outputs

    Inputs

    1 port
    InRequired

    The table containing the columns you want to keep, rename, reorder or convert.

    Accepts: Tables, Geospatial data.

    Accepts one connection on this port.

    Outputs

    1 port
    Out

    The selected columns in the order shown in the settings, with any names and data types you have changed. All input rows are kept.

    Configure the block

    The Columns grid lists the fields from the connected input. Each row controls one output column. A chosen column missing from the input is skipped with a warning, and its settings are kept.

    Automatically include new columns

    Pass through new input columns without changing their names or types.

    Column

    Shows the original input column name, even after you rename it in the output.

    Keep

    Select to include the column, or clear to exclude it. Keep at least one column selected. All input rows stay.

    Type

    Leave the current type selected to preserve it, or choose a new output type. Values that can't be converted become NULL.

    Decimal places

    Digits kept after the decimal point. Values round to this many places.

    Total digits

    Maximum digits in the value, including decimal places. Values that don't fit become NULL.

    Rename To

    Enter the output column name. Leave blank to keep the original name.

    ↑ / ↓

    Move the column up or down in the grid to change its position in the output. This doesn't sort the rows.

    Select FAQs

    Does Select remove rows?
    No. Clearing a Keep checkbox removes a column from the output. The rows stay, including rows with values that become NULL during conversion.
    Why did a value become NULL after changing its type?
    Select uses NULL when a value can't be converted to the chosen type. For example, pending can't become a DOUBLE number.
    Can I remove every column?
    No. Select needs at least one column to produce an output. If you clear every Keep checkbox, the block reports an error.

    Prepare your data. Build it in Strata.

    Strata opens in your browser, with no account.