Glue 数据目录表的 AWS 文档指出,一列有四个字段:
前三个很容易理解;这是我的 CloudFormation 模板的摘录:
# . . . the full table definition has been elided . . .
StorageDescriptor:
Columns:
- { Name: id, Type: string, Comment: "A unique key; UUIDv4" }
但是,我不清楚Parameters应该用来做什么。
我已复制并粘贴以下有问题的文档部分:
Column structure
A column in a Table.
Fields
Name
- Required: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.
- The name of the Column.
Type
– UTF-8 string, not more than 131072 bytes long, matching the Single-line string pattern.
- The data type of the Column.
Comment
– Comment string, not more than 255 bytes long, matching the Single-line string pattern.
- A free-form text comment.
Parameters
– A map array of key-value pairs. Each key is a Key string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern. Each value is a UTF-8 string, not more than 512000 bytes long. These key-value pairs define properties associated with the column.
但是,Parameters 未出现在此处提供的 CloudFormation 文档中:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-column.html
问题:
参数字段对于存储有关名称、类型或注释字段未捕获的列的附加元数据非常有用
因此您可以使用它来定义与表中的列关联的属性
AWS Glue 文档提供了由 AWS Glue 爬网程序设置的参数列表。你可以在这里
列出这个列表这些参数包括:
例如,如果名为 my_table 的表中有一个名为 data 的列,则可以将该数据列的 typeOfData 参数设置为 file(如果该列包含文件数据)、table(如果该列包含表数据)或 view(如果该列包含查看数据1.