AWS Glue error to write redshift > 50000 records

0

Trying to write the records from S3 text file to Redshit. It running when the record count is around 10000, but running long and further connection timing out when trying to write the entire file (50K records)

df.write.format("jdbc").
option("url", redshiftclusterurl).
option("dbtable", dbtable).
option("user", username).
option("password", password).
option("connectTimeout", "120000").
mode('append').save()

AWS
posta 9 mesi fa188 visualizzazioni
1 Risposta
0

It might be you have too many partitions and thus trying to use too many connections which Redshift might not accept.
You can you the option numPartitions to control this parallelism (or just repartition the data).

Please note using JDBC on Redshift as the data grows is inefficient, the Glue connector will scale much better (you can convert your DataFrame to DynamicFrame): https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect-redshift-home.html#aws-glue-programming-etl-connect-redshift-write

profile pictureAWS
ESPERTO
con risposta 9 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande