AWS Glue takes a long time to complete

I just run a very simple job like this

glueContext = GlueContext(SparkContext.getOrCreate())
l_table = glueContext.create_dynamic_frame.from_catalog(
             database="gluecatalog",
             table_name="fctable") 
l_table = l_table.drop_fields(['seq','partition_0','partition_1','partition_2','partition_3']).rename_field('tbl_code','table_code')
print "Count: ", l_table.count()
l_table.printSchema()
l_table.select_fields(['trans_time']).toDF().distinct().show()
dfc = l_table.relationalize("table_root", "s3://my-bucket/temp/")
print "Before keys() call "
dfc.keys()
print "After keys() call "
l_table.select_fields('table').printSchema()
dfc.select('table_root_table').toDF().where("id = 1 or id = 2").orderBy(['id','index']).show()
dfc.select('table_root').toDF().where("table = 1 or table = 2").show()

The data structure is also simple:

root
|-- table: array
| |-- element: struct
| | |-- trans_time: string
| | |-- seq: null
| | |-- operation: string
| | |-- order_date: string
| | |-- order_code: string
| | |-- tbl_code: string
| | |-- ship_plant_code: string
|-- partition_0
|-- partition_1
|-- partition_2
|-- partition_3

When I run the test test, it needs 12 to 16 minutes. But the cloud observation log showed that the work took 2 seconds to display all my data.

So my questions are: Where does AWS glue work that spends time outside of registration, and what does it do outside of the magazine?

+10
source share
3 answers

, . , AWS GLUE, . , , , GLUE ( 1 ), script script , . , script. 17 , 3 .

+17

DPU "Script ()". , - , .

+1

May 2019 Update -

  • Cold start time = 7-8 minutes

  • Warm pool maintained for = 10-15 minutes

0
source

All Articles