Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sc._jsc.hadoopConfiguration().set("fs.s3n.awsAccessKeyId", "")
- sc._jsc.hadoopConfiguration().set("fs.s3n.awsSecretAccessKey", "")
- # Read data from a table
- df = sqlContext.read \
- .format("com.databricks.spark.redshift") \
- .option("url", "jdbc:redshift://url:5439/probes?user=username&password=password") \
- .option("query", "select * from cloudtraxwebhook") \
- .option('forward_spark_s3_credentials',True) \
- .option("tempdir", "s3n://ncompass-cloudtrax3/tmp/") \
- .load()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement