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

FORMAT_PHONE_NUMBER - AWS Glue DataBrew

FORMAT_PHONE_NUMBER

Returns a column in which a phone number string is converted into a formatted value.

Parameters
  • sourceColumn – The name of an existing column.

  • phoneNumberFormat – The format to convert the phone number to. If no format is specified, the default is E.164, an internationally-recognized standard phone number format. Valid values include the following:

    • E164 (omit the period after E)

  • defaultRegion – A valid region code consisting of two or three uppercase letters that specifies the region for the phone number when no country code is present in the number itself. At most, one of defaultRegion or defaultRegionColumn can be provided.

  • defaultRegionColumn – The name of a column of the advanced data type Country. The region code from the specified column is used to determine the country code for the phone number when no country code is present in the number itself. At most, one of defaultRegion or defaultRegionColumn can be provided.

Notes
  • Inputs that can't be formatted to a valid phone number remain unmodified.

  • If no default region is provided, and a phone number doesn't start with a plus symbol (+) and country calling code, the phone number isn't formatted.

Example: Fixed default region

{ "Action": { "Operation": "FORMAT_PHONE_NUMBER", "Parameters": { "sourceColumn": "Phone Number", "defaultRegion": "US" } } }

Example: Default region column option

{ "Action": { "Operation": "FORMAT_PHONE_NUMBER", "Parameters": { "sourceColumn": "Phone Number", "defaultRegionColumn": "Country Code" } } }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.