Skip to content

Instantly share code, notes, and snippets.

@snehamehrin
Created August 6, 2020 22:54
Show Gist options
  • Save snehamehrin/2ee87c13d6be5d7d65fc6c8016b58fae to your computer and use it in GitHub Desktop.
Save snehamehrin/2ee87c13d6be5d7d65fc6c8016b58fae to your computer and use it in GitHub Desktop.
df_duplicates.write.format("com.databricks.spark.redshift")\
.option("url", "jdbc:redshift://redshift-cluster-1.c9lgtyzxfycf.us-east-1.redshift.amazonaws.com:5439/dev?user=awsuser&password=")\
.option("dbtable", "stackoverflow")\
.option("forward_spark_s3_credentials","true")\
.option("tempdir", "s3n://stack-overflow-bucket")\
.mode("append")\
.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment