下面的代码没有等效的东西可以从Spark DataFrame转换为Glue DynamicFrame,这是故意的,解决方法是什么?
# Convert to a dataframe and partition based on "partition_col"
partitioned_dataframe = datasource0.toDF().repartition(1)
# Convert back to a DynamicFrame for further processing.
partitioned_dynamicframe = DynamicFrame.fromDF(partitioned_dataframe, glueContext, "partitioned_df")
答案 0 :(得分:1)
使用此:
# Convert Spark's DataFrame to Glue's DynamicFrame
val partitioned_dynamicframe = DynamicFrame(partitioned_dataframe, glueContext)