создавать динамические кадры и хранить их рекурсивно - PullRequest
0 голосов
/ 11 мая 2018

Среда: Python 3.6 pyspark glue aws Я определил список с каждым именем DF, которое я создал ранее.Затем мой следующий шаг может быть преобразован в динамический df и сохранен рекурсивно.Кто-нибудь знает, возможно ли что-то подобное даже так:

for frame in frame_list:
    frame = DynamicFrame.fromDF(frame, glueContext, frame)

    applyformat = ApplyMapping.apply(frame = frame, mappings =
        [("booking_year","string","booking_year","string"),
         ("booking_month","string","booking_month","string"),
         ("total_frequent_customers","string","total_frequent_customers","string"),
         ("period_new_customers","string","period_new_customers","string")],
        transformation_ctx = "applyformat")

    glueContext.write_dynamic_frame.from_options(
       frame = frame,
       connection_type = "s3",
       connection_options = {"path": "s3://bucket/etl-process/"},
       format = "orc")
...