AWS GLUE ERROR: File already exists

0

I have this code to write in Redsfhit

dinamycFrame = DynamicFrame.fromDF(df, glueContext, df)

try:
    glueContext.write_dynamic_frame.from_jdbc_conf(frame = dinamycFrame,
                                                       catalog_connection = "Redshift PROD",
                                                       connection_options = {"preactions": "truncate table dim_areas_master;","dbtable": "dim_areas_master", "database": "mydb"},
                                                       redshift_tmp_dir = "s3://bucket-sample-name/XXXXXXXXXX", transformation_ctx="dim_areas_master")
except TypeError:
    pass

an i have this error

An error occurred while calling o197842.pyWriteDynamicFrame. File already exists:s3://bucket-sample-name/XXXXXXXXXX/cf31dfbc-d1c5-43f6-9029-b274b3c980cd/part-02052-0968ebe2-57d1-468e-8cb2-c16ee515c9f8-c000.csv

I have no idea how to solve this problem.

In cloudwatch logs show: Enter image description here

Thanks for help

profile picture
EXPERT
asked 2 years ago70 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions