AWS Glue predicate push down condition has no effect

前端 未结 2 411
一整个雨季
一整个雨季 2021-01-14 11:34

I have a MySQL source from which I am creating a Glue Dynamic Frame with predicate push down condition as follows

datasource = glueContext.create_dynamic_fra         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-14 12:18

    This is great! I was able to use it to obtain the last 30 days of data using my "dt" partition column:

    datasource0 = glueContext.create_dynamic_frame.from_catalog(
        database = "my_db",
        table_name = "my_table",
        push_down_predicate = "to_date(dt) >= date_sub(current_date, 30)", 
        transformation_ctx = "datasource0"
    )
    

    I'm using Glue 1.0 - Spark 2.4 - Python 2.

提交回复
热议问题