Amazon web services 在python上创建数据目录表

Amazon web services 在python上创建数据目录表,amazon-web-services,aws-sdk,boto3,aws-glue,Amazon Web Services,Aws Sdk,Boto3,Aws Glue,我一直在尝试使用python API在我们的数据目录中创建一个表。遵循发布的文档和API。我能理解这是怎么回事。尽管如此,我还是需要了解在创建表时如何声明字段结构,因为当我查看表的存储定义时,有任何关于如何为表定义此类列的解释。此外我没有看到所涵盖的表的分类属性。也许是房地产?我已将boto3用于此样本 代码: 找到此帖子是因为我遇到了相同的问题,并最终找到了解决方案,因此您可以按类型执行: array<struct<id:string,timestamp:bigint,messag

我一直在尝试使用python API在我们的数据目录中创建一个表。遵循发布的文档和API。我能理解这是怎么回事。尽管如此,我还是需要了解在创建表时如何声明字段结构,因为当我查看表的存储定义时,有任何关于如何为表定义此类列的解释。此外我没有看到所涵盖的表的分类属性。也许是房地产?我已将boto3用于此样本

代码:


找到此帖子是因为我遇到了相同的问题,并最终找到了解决方案,因此您可以按类型执行:

array<struct<id:string,timestamp:bigint,message:string>>
数组
我在使用AWS控制台并单击通过爬虫程序创建的现有表的数据类型时发现了这个“提示”。它暗示:

An ARRAY of scalar type as a top - level column.
ARRAY <STRING>

An ARRAY with elements of complex type (STRUCT).
ARRAY < STRUCT <
  place: STRING,
  start_year: INT
>>

An ARRAY as a field (CHILDREN) within a STRUCT. (The STRUCT is inside another    ARRAY, because it is rare for a STRUCT to be a top-level column.)
ARRAY < STRUCT <
  spouse: STRING,
  children: ARRAY <STRING>
>>

A STRUCT as the element type of an ARRAY.
ARRAY < STRUCT <
  street: STRING,
  city: STRING,
  country: STRING
>>
作为顶级列的标量类型数组。
排列
包含复杂类型(STRUCT)元素的数组。
数组<结构<
地点:弦,,
起始年份:INT
>>
结构中作为字段(子项)的数组。(该结构位于另一个数组中,因为很少有结构是顶级列。)
数组<结构<
配偶:字符串,
子项:数组
>>
作为数组元素类型的结构。
数组<结构<
街道:弦,
城市:字符串,
国家:字符串
>>
An ARRAY of scalar type as a top - level column.
ARRAY <STRING>

An ARRAY with elements of complex type (STRUCT).
ARRAY < STRUCT <
  place: STRING,
  start_year: INT
>>

An ARRAY as a field (CHILDREN) within a STRUCT. (The STRUCT is inside another    ARRAY, because it is rare for a STRUCT to be a top-level column.)
ARRAY < STRUCT <
  spouse: STRING,
  children: ARRAY <STRING>
>>

A STRUCT as the element type of an ARRAY.
ARRAY < STRUCT <
  street: STRING,
  city: STRING,
  country: STRING
>>