Converting Column Types
You can easily convert a column from one type to another using the data type icon in Prep Data or the Column List dialog. You can also convert data types by using the Convert operations.
Converting columns types using the Data Type icon
Icons on the header readily tell you a column's data type:
Date/Time
Number
Text
You can quickly convert from data type to another following these steps.
-
Click on the data type icon beside the name of the column you want to convert.
-
Select the new data type.
Converting column types using the Column List dialog
The Column List dialog provides another means for you to convert data types in Data Prep Studio.
-
Right-click on a column whose type you wish to convert and, from the options that display, select Column List.
The Column List dialog displays.
-
Use the drop down provided in the Type column to select a new data type for your column.
-
Click OK when you are finished.
Converting column types using the Convert operation
You can quickly convert from one data type to another following these steps.
-
In Prep Data, right click on a column and select Convert from the context menu to display possible conversions.
-
Select the convert operation you want to carry out:
The operations you can select depend on the column's current data type.
Editing column type changes in the Change History panel
You can modify the column type changes in the Change History panel by following these steps:
- Display the Change History List panel.
-
Select the Edit icon beside the column type change you want to review or edit.
The Convert Column dialog box displays:
-
Modify the settings available and then click OK.
The following column type changes can be edited via the Change History panel:
Column Type Change |
Options Available |
Text to Numeric |
Decimal separator: The character to use in separating decimals in numeric values. The available options are period and comma.
|
Text to Date |
Date Format: The format of dates used when converting text into date values. The available options are as follows:
First Year of Century: Used for converting two-digit years into four-digit years. The default value is 50. Extraction Patterns: The patterns searched for when converting text values into date/time values.
|
Numeric to Text |
Locale: Used to set the language when converting numeric values to text values. Format: Used to set the format of the text. Click the Edit icon to launch the Format dialog box and select the desired numeric format of the text to be displayed (i.e., Fixed, Number, Financial, Currency, Percent, Scientific, and Custom).
|
Date to Text |
Locale: Used to set the language when converting date/time values to text values. Format: Used to modify the format of the text. Click the Edit icon to launch the Format dialog box and set the desired date format of the text to be displayed (i.e., Short Date, Long Date, Short Date/Time, Long Date/Time, Time, and Custom).
|
© 2024 Altair Engineering Inc. All Rights Reserved.