【问题标题】:Is this possible to load parquet file from aws s3 to the dynamodb through Glue?这可以通过胶水将镶木地板文件从 aws s3 加载到 dynamodb 吗?
【发布时间】:2021-08-17 11:33:21
【问题描述】:

我正在寻找一种解决方案,从 s3 文件夹中读取 parquet 文件,并在进行几次转换后使用 Glue 转储到 dynamodb。

ETL Process
s3-folder/parquet_file --> Glue_Transformation --> Dynamodb

请告诉我最好的解决方案是什么?

谢谢

【问题讨论】:

    标签: amazon-s3 boto3 etl aws-glue amazon-dynamodb


    【解决方案1】:

    这可以通过 AWS Glue 实现。您可以按照以下方法:

    1. 从 S3 parquet 读取

    dyf_parq = glueContext.create_dynamic_frame_from_options(connection_type = "s3", connection_options = {"paths": ["s3://s3-glue/testing-parquet"], "recurse"=True}, format = "parquet")

    1. 然后做你的转换

    2. 完成后,您可以写入 dynamodb,如下所示:

      glue_context.write_dynamic_frame_from_options(
           frame=dyf,
           connection_type="dynamodb",
           connection_options={
               "dynamodb.output.tableName": "test_sink",
               "dynamodb.throughput.write.percent": "1.0"
           }
       )
      

    要了解有关 dynamodb 作为接收器的更多信息,请参阅this doc。

    【讨论】:

    • 用什么版本的胶水?
    猜你喜欢
    • 2023-03-24
    • 2020-08-07
    • 2021-07-07
    • 2022-11-27
    • 2021-12-02
    • 2023-03-27
    • 2018-01-07
    • 2019-12-22
    • 1970-01-01
    相关资源
    最近更新 更多