Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

CATEGORICAL_MAPPING - AWS Glue DataBrew

CATEGORICAL_MAPPING

Maps one or more categorical values to numeric or other values

Parameters
  • sourceColumn – The name of an existing column.

    categoryMap – A JSON-encoded string representing a map of values to categories.

    deleteOtherRows – If true, all non-mapped rows will be removed from the dataset.

    other – When provided, all non-mapped values will be replaced by this value.

    keepOthers – If true, all non-mapped values will remain the same.

    mapType – The data type of the mapped column.

    targetColumn – The name of a column to contain the results.

Example

{ "Action": { "Operation": "CATEGORICAL_MAPPING", "Parameters": { "categoryMap": "{\"United States of America\":\"1\",\"Canada\":\"2\",\"Cuba\":\"3\",\"Haiti\":\"4\",\"Dominican Republic\":\"5\"}", "deleteOtherRows": "false", "keepOthers": "true", "mapType": "NUMERIC", "sourceColumn": "state_name", "targetColumn": "state_name_mapped" } } }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.