Spark Redshift with Python
Question: I'm trying to connect Spark with amazon Redshift but i'm getting this error :

[![enter image description
here](http://i.stack.imgur.com/EV8RD.png)](http://i.stack.imgur.com/EV8RD.png)

My code is as follow :

    
    
    from pyspark.sql import SQLContext
    from pyspark import SparkContext
    
    sc = SparkContext(appName="Connect Spark with Redshift")
    sql_context = SQLContext(sc)
    sc._jsc.hadoopConfiguration().set("fs.s3n.awsAccessKeyId", <ACCESSID>)
    sc._jsc.hadoopConfiguration().set("fs.s3n.awsSecretAccessKey", <ACCESSKEY>)
    
    df = sql_context.read \
        .option("url", "jdbc:redshift://example.coyf2i236wts.eu-central-    1.redshift.amazonaws.com:5439/agcdb?user=user&password=pwd") \
        .option("dbtable", "table_name") \
        .option("tempdir", "bucket") \
        .load()
    


Answer: I think the `s3n://` URL style has been deprecated and/or removed.

Try defining your keys as `"fs.s3.awsAccessKeyId"`.

