Normalize column names(标准化列名)¶
Supported in: Batch, Faster, Streaming
Normalizes column names to use lower_snake_case.
Transform categories: Data preparation
Declared arguments¶
- Dataset: Dataset to normalize column names.
Table - optional Remove special characters: Removes all instances of @~`!#$%^&=*+':"/?>< from column names.
Literal\
Examples¶
Example 1: Base case¶
Argument values:
- Dataset: ri.foundry.main.dataset.a
- Remove special characters: null
Input:
| recentlyServiced | tailNumber | _airlineCode |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
Output:
| recently_serviced | tail_number | airline_code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
Example 2: Base case¶
Argument values:
- Dataset: ri.foundry.main.dataset.a
- Remove special characters: true
Input:
| recently^Serviced | tail@Number$ | !airline*Code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
Output:
| recently_serviced | tail_number | airline_code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
Example 3: Edge case¶
Argument values:
- Dataset: ri.foundry.main.dataset.a
- Remove special characters: null
Input:
| columnA. | columnB() | column!C | column,;{} D | column()e |
|---|---|---|---|---|
| foo | bar | fooBar | foo | bar |
Output:
| column_a | column_b | column!_c | column_d | column_e |
|---|---|---|---|---|
| foo | bar | fooBar | foo | bar |
中文翻译¶
标准化列名¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
将列名标准化为小写下划线命名格式(lower_snake_case)。
转换类别:数据准备
声明参数¶
- 数据集(Dataset): 需要标准化列名的数据集。
表格 - 可选 移除特殊字符(Remove special characters): 移除列名中所有 @~`!#$%^&=*+':"/?>< 等特殊字符。
字面量\<布尔值>
示例¶
示例 1:基础情况¶
参数值:
- 数据集: ri.foundry.main.dataset.a
- 移除特殊字符: null
输入:
| recentlyServiced | tailNumber | _airlineCode |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
输出:
| recently_serviced | tail_number | airline_code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
示例 2:基础情况¶
参数值:
- 数据集: ri.foundry.main.dataset.a
- 移除特殊字符: true
输入:
| recently^Serviced | tail@Number$ | !airline*Code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
输出:
| recently_serviced | tail_number | airline_code |
|---|---|---|
| true | KK-150 | KK |
| false | XB-120 | XB |
| true | MT-190 | MT |
示例 3:边界情况¶
参数值:
- 数据集: ri.foundry.main.dataset.a
- 移除特殊字符: null
输入:
| columnA. | columnB() | column!C | column,;{} D | column()e |
|---|---|---|---|---|
| foo | bar | fooBar | foo | bar |
输出:
| column_a | column_b | column!_c | column_d | column_e |
|---|---|---|---|---|
| foo | bar | fooBar | foo | bar |