给定一个SchemaRDD
(使用加载SQLContext.parquetFile
),我如何提取它的元数据/模式/列列表?
问问题
204 次
2 回答
3
The field list is accessible through the SchemaRDD
as [rdd].schema.fields
.
lazy val schema: StructType Returns the schema of this SchemaRDD (represented by a StructType).
于 2015-01-08T23:07:16.610 回答
0
下还有一个printSchema()
方法SchemaRDD
,见SchemaRDD。
于 2015-07-10T12:19:26.623 回答