如何将实木复合地板架构映射到胶水?

时间:2020-05-26 07:10:02

标签: apache-spark parquet aws-glue

我正在从现有的镶木地板文件中使用boto3创建粘合表。

拼花地板上的类型的天真映射(使用Spark模式中的类型名称)无法正常工作 是否有关于如何映射这些类型的参考? (包括复杂类型-结构,数组等)

我尝试过的事情:

client.create_table(DatabaseName=db_name, TableInput={
"StorageDescriptor": {
"Columns":[
            {
                'Name': x.name,
                'Type': x.dataType.typeName()
            } for x in df.schema
}
})

其中df是spark数据帧,并省略了不相关的参数。

实际的表创建有效,但是查询表(使用athena)返回:

HIVE_METASTORE_ERROR: com.facebook.presto.spi.PrestoException: Error: type expected at the position 0 of 'integer' but 'integer' is found. (Service: null; Status Code: 0; Error Code: null; Request ID: null)

0 个答案:

没有答案