如何在AWS Glue中将单个列拆分为多个列

时间:2019-12-14 18:38:39

标签: amazon-web-services pyspark-sql aws-glue pyspark-dataframes aws-glue-data-catalog

我在S3中有一个拼花文件,其中有一个特定的列,其中包含字典数据。

样本数据:

Emp_id,详细信息,政策

100,{“ Name”:“ Ajay”,“ Age”:“ 29”,“ Pin”:“ 600”},是

101,{“ Name”:“ Gokul”,“ Age”:“ 25”,“ Pin”:“ 601”},是

我想将详细信息列分为多个列,列名称来自键,值来自值。想要使用Python做到这一点。

预期输出:

Emp_id,名称,年龄,Pin,政策

100,Ajay,29,600,是

101,Gokul,25,601,是

0 个答案:

没有答案